Geolocation block using UFW
Is there a way of whitelisting access to ports based on ip geolocation using UFW.
2 Replies
mjones
Linode Staff
There's no way to add an entire country or location to UFW using one command, but you could collect a list of IP addresses that are likely to be used in one location and then add all of them to UFW in just a few steps. There's a guide on doing so here:
https://scottlinux.com/2013/08/30/block-geo-region-list-of-ips-with-ufw-in-linux/