13,420
edits
Changes
no edit summary
'''Examples:'''
<table width="80%" cellpadding="10" cellspacing="0" border="1"><tr><td width="30%">'''iptables -A INPUT -p tcp --sport 80 -j ACCEPT'''</td><td>Append policy to bottom of INPUT chain to accept all tcp packets from port 80</td></tr><tr><td>'''iptables -A OUTPUT -p tcp --dport 80 -j ACCEPT'''</td><td>Append policy to bottom of OUTPUT chain to accept all tcp packets to port 80</td></tr><tr><td>'''iptables -I INPUT -p tcp --sport 22 -j LOG'''</td><td>Insert policy at top of INPUT chain to log all tcp packets from port 22</td></tr><tr><td>'''iptables -I INPUT 3 -p tcp --dport 22 -j LOG'''</td><td>Insert policy before line 3 of INPUT chain to log all tcp packets from port 22</td></tr></table>