How do I display iptables packet filtering configuration on linux?
-
In the output displayed no packet filtering is setup in other articles you'll see how basic firewall rules can be setup. To breifly explain, the INPUT chain mean packeting coming into your system from the network, OUTPUT mean packets going out of your systems onto the network, and FORWARD mean pass the packet onto another network node.
show all chains in the filter table
# iptables -t filter -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
show the nat chains in the filter table
# iptables -t nat -L Chain PREROUTING (policy ACCEPT) target prot opt source destination Chain POSTROUTING (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination show the mangle chains in the filter table # iptables -t mangle -L Chain PREROUTING (policy ACCEPT) target prot opt source destination 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 Chain POSTROUTING (policy ACCEPT) target prot opt source destination
© Lightnetics 2024