1

Yesterday, I was reading about the NAT then, during that time I endup with above doubt, I am thinking that if some application from private network makes call to outside world i.e. public network using some XYZ port,

Now, This entry will be stored in the NAT table, If I get the external port and external ip for that application request then, Is it possible for me to establish the some sort of connection from outside public network with the host in the private network by closing the connection which he/she made using XYZ port and immediately binding to my application with XYZ port?

If it is not possible then, how can i connect to my application running in the private network from outside the private network?(tunnelling?)

0

The period the table entry remains open depends on the router model, software version, and configuration. For TCP (connection-oriented), many will keep the port open as long as the TCP connection is up, or for a configured time period with no activity. For UDP (connectionless), it will be for a configured time period. The time periods are vendor dependent.

The NAT table entry will have the source and destination IP addresses in the table. Unless your outside host has an IP address of a table entry, you will not be able to originate a connection from outside.

You cannot originate a connection from outside unless you have some way to bypass the NAT, e.g. a tunnel, or you have configured static entries for the NAT.

  • Thanks, If I use this(provided by ipchicken.com) external port and ip and made the tcp request on that port then is it possible for me to establish the connection? – 0x47-sci-tech May 14 '16 at 6:01
  • No. When you do that from the inside, the host inside is establishing a connection to the web server. The connection is between that host IP address and port and the web server IP address and port. Only those two devices can communicate in that TCP session. – Ron Maupin May 16 '16 at 17:56
  • suppose, If I terminate that connection and immediately send the request on the external port and ip then I can establish connection right? – 0x47-sci-tech May 21 '16 at 10:02
  • No. The NAT table entry will not have your IP address as the source address. – Ron Maupin May 21 '16 at 14:51
  • Thanks, But as per my knowledge NAT only contains the Private ip | Private port | External port. Does it contains the address of the outside fellow to which we are trying to connect from private network?Would like to share useful material related to NAT? – 0x47-sci-tech May 21 '16 at 15:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.