Piaware exposed to the internet

I just went trough the hoops described here, to block certain countries:
How to Block IPs from Countries using Iptables Geoip Addons (linoxide.com)

I first made the mistake to use the ! argument (“not”) to ban everything not equal to US IP. Well that worked so good that it blocked my local IP connection too (PuTTY lost connection to 192.168.1.xxx)! Ooops! Had to go to the laptop and manually clear the IP tables lists, to start fresh.
Then I just added a few countries to the blocked list (instead of “not” operator) but now I cannot test it. Probably works… IDK.
LE: I have tested it and seems to work. Added NL as DROP country and logged from a free VPN with NL IP address and I could not reach my local page.
Then I changed the rule to allow NL and DROP the other “hacky” countries…

1 Like