Open main menu

CDOT Wiki β

Changes

Lab 6 Warnings / Debrief

53 bytes added, 08:22, 19 November 2015
no edit summary
'''Let's break down the command to see how it works:'''
The '''<span style="font-family:courier; font-weight:bold">-I''' </span> switch tells iptables to INSERT this line into the OUTPUT policy. This means it will be the first line in the policy. If we used a -A switch it would have appended the line and it would be the last line of the policy. If you are writing complex iptables rules where multiple matches can occur, it is important that the lines go in the right order. If you follow the -I with a number, the new rule will be inserted at that location in the chain (for example, <code>-I 3 OUTPUT</code> will insert the rule into the 3rd position in the OUTPUT chain, moving the existing rules down as necessary (the old rule #3 will become the new rule #4, for example).
The '''-p tcp''' switch tells iptables to only match TCP packets. Alternately, the protocol could be set to udp, icmp, or all.
13,420
edits