StopForumSpam.com -> iptables

By: Chocolate Anoa | 2 Years | Syntax: Bash | Views: 403
URL http://paste.itunix.eu/view/5e341058

  1. #Start with the dependencies:
  2.  
  3.     apt-get install zip unzip ipset
  4.  
  5. #Then add this to your existing iptables firewall script:
  6.  
  7.     ipset create sfs_block hash:net
  8.     iptables -I FORWARD -p tcp --dport 80:443 -m set --match-set sfs_block src -j DROP
  9.  
  10.  
  11. #Then a script that updates the ipset:
  12.  
  13.     ipset destroy tempset
  14.     ipset create tempset hash:net
  15.     cd /tmp
  16.     wget -N http://www.stopforumspam.com/downloads/listed_ip_7.zip
  17.     unzip listed_ip_7.zip
  18.     sed 's:^:add tempset :' listed_ip_7.txt > listed_ip_7_importfile.txt
  19.     ipset restore < listed_ip_7_importfile.txt
  20.     rm listed_ip_7_importfile.txt
  21.     ipset swap tempset sfs_block

Reply to "StopForumSpam.com -> iptables"

Here you can reply to the paste above