Geo-Block with ufw in Ubuntu 14.04

Quickly and Easily block ip addresses in bulk using ufw.
This is helpful to block heavy spam countries.

create a text file with CIDR format ip addresses

I recommend the list from or

run ./ china.txt to block all ip adresses from file
run ./ china.txt to unblock

Leave a Reply

Your email address will not be published. Required fields are marked *