can i use an ip-list include file for iptable blacklisting

Posted by rubo77 on Server Fault See other posts from Server Fault or by rubo77
Published on 2012-09-13T14:28:26Z Indexed on 2012/09/13 15:40 UTC
Read the original article Hit count: 185

Filed under:
|
|
|
|

I would like to block all countries except mine in iptables, that is a lits with about 100.000 Entries.

how can i define this blacklistfile in a script, so iptables blocks all those ip-ranges?

maybe i can use http://www.ipdeny.com/ipblocks/data/countries/ that provides lists in the form

117.55.192.0/20
117.104.224.0/21
119.59.80.0/21
121.100.48.0/21
...

i want to be able to change the blacklistfile easily without having to change the iptables-script

© Server Fault or respective owner

Related posts about linux

Related posts about security