subscribe to our Youtube


14455 questions

17168 answers


0 members

We are migrating to our new platform at Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
666 views 1 comments
by anonymous
Is it possible to make geolocation based firewall rules with Geoip database, or some other way. I would like to open some ports but only from my country and block other countries.

1 Answer

0 votes
by anonymous

There is no simple way to do this efficiently, you could create custom firewall rules for your country that allows connections, and set the default to deny all others.

Of course a simple VPN would get around this as a security measure.

IP lists are available, I found this: 

by anonymous
I'll try to do something with those lists, thanks. I was hoping there would be some automated solution, similar which I use with Pfsense firewalls, country IP lists are automatically updated etc. Those lists aren't very accurate but serves purpose here.

But, this is Linux and iptables, not giving up yet. And of course VPN is always an option and more secure.