Is there a way to view iptables
rules in a bit more detail?
I recently added masquerade to a range of IPs:
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
service iptables save
service iptables restart
Which has done what I want it to, but when I use:
iptables -L
I get the same output as I normally get:
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
How can I see the rules including the ones I add? (system is CentOS 6)
filter
,nat
,mangle
,raw
,security
... andmark
looks like another one. Having a hard time finding a way to list all the tables, especially if some are system dependent. Someone asked the same thing a while ago with no real answer: https://comp.os.linux.networking.narkive.com/fDfacHDC/iptables-how-to-list-tables – tarabyte Apr 22 '22 at 21:23