iptables POSTROUTING interface question
by Shwick from LinuxQuestions.org on (#6QHY6)
I'm not sure if they interface I list in my postrouting rule is being properly added to iptables. (trying to enable routing on mini pc)
When I execute(wifi0 is interface name):
iptables -t nat -A POSTROUTING -o wifi0 -j MASQUERADE
and
sudo iptables -t nat -L
I get
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- anywhere anywhere
When I do an invalid interface, it adds the same rule.
iptables -t nat -A POSTROUTING -o wifi0 -j MASQUERADE
table is then:
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- anywhere anywhere
MASQUERADE all -- anywhere anywhere
So my question is, is this successfully adding the interface the scenes? thanks
When I execute(wifi0 is interface name):
iptables -t nat -A POSTROUTING -o wifi0 -j MASQUERADE
and
sudo iptables -t nat -L
I get
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- anywhere anywhere
When I do an invalid interface, it adds the same rule.
iptables -t nat -A POSTROUTING -o wifi0 -j MASQUERADE
table is then:
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- anywhere anywhere
MASQUERADE all -- anywhere anywhere
So my question is, is this successfully adding the interface the scenes? thanks