Monday, December 13, 2010

Common iptables command, cheatsheet

November 12, 2009 by admin  
Filed under General

#!/bin/sh #File: /etc/rc.d/rc.firewall # Immediately log and drop any known abusive IPs iptables -A INPUT -p tcp -s 87.118.104.44 -m limit –limit 1/minute  –limit-burst 10  -j LOG –log-prefix “[DROPPED_NODE]“   –log-level 4 iptables -A INPUT -p tcp -s 87.118.104.44 -j DROP # Allow from any to any on 127.0.0.1/32 iptables -A INPUT -s 127.0.0.1/32 -j ACCEPT [...]