understanding the output of iptables -L
tags: learning networking linux
content
output of iptables -L --line-numbers
Chain INPUT (policy ACCEPT)
num target prot opt source destination
Chain FORWARD (policy ACCEPT)
num target prot opt source destination
1 ACCEPT all -- 10.42.0.0/16 anywhere
2 ACCEPT all -- anywhere 10.42.0.0/16
Chain OUTPUT (policy ACCEPT)
num target prot opt source destination
- 3 chains
- whatever in
()is the default rule for that chain- e.g., for chain
INPUT, if no rules specified, default is accept the packet
- e.g., for chain
- how to understand
ACCEPTin aOUTPUTchain?- accept sounds like it’s only for incoming traffic, but it really just means allow
ACCEPTin aOUTPUTmeans allow a traffic to go out