Masquerade UDP doesn't work
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hello,
Masquerade do not work at a UDP port, but if it works at a TCP port.
(works) iptables -t nat -I POSTROUTING -m tcp -p tcp --dport 22 -o ppp0 -j MASQUERADE (not working) iptables -t nat -I POSTROUTING -m udp -p udp --dport 1195 -o ppp0 -j MASQUERADE
Any ideas?
regards
E.Huerta
Quoted 9 lines · Enrique Huerta de la Fuente
Hello,
Masquerade do not work at a UDP port, but if it works at a TCP port.
(works) iptables -t nat -I POSTROUTING -m tcp -p tcp --dport 22 -o ppp0 -j MASQUERADE
(not working) iptables -t nat -I POSTROUTING -m udp -p udp --dport 1195 -o ppp0 -j MASQUERADE
The "-m udp" confuses me. Do you really need to specify that module, try it without the -m option for UDP, I don't tend to use it for TCP either, but if it's not broken, don't fix it...
Signature · 1 line
Message sent via my webmail account.
Quoted 11 lines · Giles Coochey
Quoted 9 lines · Enrique Huerta de la Fuente
Hello,
Masquerade do not work at a UDP port, but if it works at a TCP port.
(works) iptables -t nat -I POSTROUTING -m tcp -p tcp --dport 22 -o ppp0 -j MASQUERADE
(not working) iptables -t nat -I POSTROUTING -m udp -p udp --dport 1195 -o ppp0 -j MASQUERADE
Quoted 3 lines
The "-m udp" confuses me. Do you really need to specify that module, try it without the -m option for UDP, I don't tend to use it for TCP either, but if it's not broken, don't fix it...
Note that -p only looks at the IP header, but -m udp is required for the UDP header. So yes, -m udp is required (though it's added automatically if you forget it).