jasonnixon.net - quick reference - iptables


examples generated with iptables v 1.3.5

iptables -vnL
Show a verbose list of the current firewall rules in all chains (in numeric form).

iptables -A FORWARD -s 0.0.0.0/0 -d 192.168.1.0/24 -p tcp --dport 3389 -j ACCEPT -m comment --comment "Microsoft RDP"
add a rule to the chain "FORWARD" allowing TCP port 3389 connections from any source to any destination in the private address range 192.168.1.0/24.

iptables -A FORWARD -p 47 -j ACCEPT -m comment --comment "GRE"
add a rule to the chain "FORWARD" allowing IP protocol 47 (GRE) connections from any source to any destination.




Valid HTML 4.01 Transitional Valid CSS!