Packet filter rules with iptables.
http://safesrv.net/quick-how-to-denyallow-ip-using-iptables/
Caution: these are admin changes to packet filtering.
Flags
-f— flush-x— clear-v— show interface name--line-numbers— include line numbers-L— list-n— numeric
Block
IP:
iptables -A INPUT -s xx.xx.xx.xx -j DROPIP for a port:
iptables -A INPUT -p tcp -s xx.xx.xx.xx --dport PORT -j DROPCrawler:
iptables -I INPUT -p tcp --dport 80 -m string --algo bm --string 'GET /<domain name>' -j DROPAllow
IP:
iptables -A INPUT -s xx.xx.xx.xx -j ACCEPTIP for a port:
iptables -A INPUT -p tcp -s xx.xx.xx.xx --dport PORT -j ACCEPTClear
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -t nat -F
iptables -t mangle -FLogging
http://www.thegeekstuff.com/2012/08/iptables-log-packets/
Updated:
2026 Aug 19

