New to Interworx and just deployed our first server with it.
I want to be able to apply the following script (or something very close to it) to block unwanted countries from spamming/hacking etc.
What file would I apply this to? I am not sure what firewall config files Interworx is using so I want to make sure I am applying this to the correct file.
Thank you
I want to be able to apply the following script (or something very close to it) to block unwanted countries from spamming/hacking etc.
Code:
ipset -N geoblock nethash
for IP in $(wget -O http://www.ipdeny.com/ipblocks/data/countries/{cn,kr,pk,tw,sg,hk,pe}.zone)
do
ipset -A geoblock $IP
done
Matching against the IPSet in IPTables:
iptables -A INPUT -m set set geoblock src -j DROP
Thank you