UDP nat question
First of all, thanks for replying, it's clear now.
I have one more question related to this:
Imagine a host behind NAT with IP 192.168.22.33 which has an application on port 5060 ( a sip client) and opens a connection to a server outside the NAT (the sip registrar with IP 130.11.22.33 on port 5060), and consider that the NAT box translates the SIP client src_ip to 129.11.22.33 and src_prt to 5054, for this communication.
The SIP registrar is able to reach the SIP client running on 192.168.22.33:5060 by using 129.11.22.33:5054, but what about other hosts on the Internet? Will they also be able to reach the SIP client using the pair 129.11.22.33:5054, or only packets coming from the SIP registrar be accepted?
Thanks again
Filipe Abrantes
Signature · 9 lines
Filipe Lameiro Abrantes INESC Porto Campus da FEUP Rua Dr. Roberto Frias, 378 4200-465 Porto Portugal Phone: +351 22 209 4266 E-mail: [email protected]
Quoted 10 lines
Imagine a host behind NAT with IP 192.168.22.33 which has an application on port 5060 ( a sip client) and opens a connection to a server outside the NAT (the sip registrar with IP 130.11.22.33 on port 5060), and consider that the NAT box translates the SIP client
src_ipto 129.11.22.33 andsrc_prtto 5054, for this communication.The SIP registrar is able to reach the SIP client running on 192.168.22.33:5060 by using 129.11.22.33:5054, but what about other hosts on the Internet? Will they also be able to reach the SIP client using the pair 129.11.22.33:5054,
They can't
Quoted 1 line
or only packets coming from the SIP registrar be accepted?
yes.
Sip clients behind NAT must use a Proxy.
Signature · 2 lines
damjan | дамјан This is my jabber ID --> [email protected] <-- not my mail address!!!
I don't know for sure but I believe that other clients trying to reach your SIP client on 129.11.22.33:5054 will fail as the SNAT mapping maintained by your NAT router is using the source IP, source port, destination IP, and destination port that it sees in the traffic coming from the SIP client device as it's key to match packets in it's internal structure. Thus when some other client on the net tries to connect to your SIP device on port 5054 your NAT firewall / router will see this as invalid traffic. I believe that if you want other clients on the net to be able to contact your SIP device you will need to port forward port 5060 to your SIP device, or all the traffic will need to pass through a SIP proxy somewhere on the net.
Now for the disclaimer: I'm guessing at this, but from everything that I have read and worked with this is the behavior that I would expect to see in such a situation.
Grant. . . .
Quoted 11 lines
First of all, thanks for replying, it's clear now.
I have one more question related to this:
Imagine a host behind NAT with IP 192.168.22.33 which has an application on port 5060 ( a sip client) and opens a connection to a server outside the NAT (the sip registrar with IP 130.11.22.33 on port 5060), and consider that the NAT box translates the SIP client
src_ipto 129.11.22.33 andsrc_prtto 5054, for this communication.The SIP registrar is able to reach the SIP client running on 192.168.22.33:5060 by using 129.11.22.33:5054, but what about other hosts on the Internet? Will they also be able to reach the SIP client using the pair 129.11.22.33:5054, or only packets coming from the SIP registrar be accepted?
Thanks again
Filipe Abrantes