On 03/22/2018 10:24 PM, Andrea Bodrati wrote:
> Greetings,
> I'm trying to write the following rules in /etc/shorewall/rules but I
> can't find any reference on how to do that :
> iptables -t nat -I POSTROUTING -o eth0.0 -p udp -d y.y.y.y --sport
> 5061 -j SNAT --to-source x.x.x.x:5060
> Basically I need to masquerade the source udp port to 5060 of all the
> packets coming from my public IP x.x.x.x port 5061 and with
> destination y.y.y.y.
> Thanks!

Which Shorewall Version? Earlier versions use the 'masq' file for SNAT
and MASQUERADE; later versions use the 'snat' file.

For the masq file:

eth0:y.y.y.y    -       x.x.x.x:5600    udp     -       5061

For the snat file:

SNAT(x.x.x.x:5600)      -       eth0:y.y.y.y    udp     -       5601

-Tom
-- 
Tom Eastep        \   Q: What do you get when you cross a mobster with
Shoreline,         \     an international standard?
Washington, USA     \ A: Someone who makes you an offer you can't
http://shorewall.org \   understand
                      \_______________________________________________

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Shorewall-users mailing list
Shorewall-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/shorewall-users

Reply via email to