UDP nat question

Daniel Lopes lopsch at lopsch.com
Tue Apr 19 15:31:10 CEST 2005

Filipe Abrantes schrieb:
> Hi all,
> I have a basic question about iptables UDP NAT.
> Imagine that you have 2 UDP sessions in your private LAN using the same 
> port. How does iptables nat these connections? One of the sessions will 
> get one external port of the NAT machine and the other session will get 
> another one? Does the usual MASQUERADE command suffice to achieve this?
> iptables MASQUERADE command:
> Hope I have made myself clear and,
> Thanks for your attention
> Filipe Abrantes

For example:
machine 1 running an application on port 1465
machine 2 running an application also on 1465
both make a DNS request to Port 53 UDP
the srcip of the second request reaching the router will be mapped for 
that time to a free port on the router. AFAIK

More information about the netfilter mailing list