best method for country IP blocking?

running ubuntu trusty and am wondering what the best method is for blocking certain countries from accessing my server including email, web, listserv, etc. thanks in advance!

1 Reply

I did this once with iptables, which is a barebones firewall program that's considered more difficult than others to use, but it is extensible. I used this guide successfully to block whole country's IP ranges for a personal server:

https://www.dghost.com/techno/internet/banning-an-entire-country-with-iptablesipset

Hope this helps!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct