The iptables and ipchains commands are used
to adjust and inspect the network packet filter rules in a running Linux
kernel. The ipchains command was used for 2.2.x versions of
the kernel, and although it can still be used with 2.4.x kernels, it has
been superseded by iptables.
The packet filter rules can be set up to do both firewall and router
activities. You can inspect your current rules with the -L
option to iptables:
# 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 destination
This is an example of a wide-open system, with no routing or
firewalling enabled.