IPTables: Filtering
Filtering Rules
The Filter rules filter packets based on the admin information. The rules can be edited uusing the iptables command.
There are four basic actions that can be passed:
iptables -A #Append A rule
iptables -D # Delete A Rule
itables -L #List All Rules
iptables -F #Flush the RulesList the Rules
To see the rules that are currently in place use the '-L' flag. The rules are shown in three tables based on the direction of the packet. In the example there are currently no rules set up.
iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destinationFlush the Rules
Append / Delete A Rule
= Direction (-a)
Filter Rules Apply in three Directions: Outgoing, Incoming and Forwarding.