Solved

Bypass NAT Router Solution - by using a intermediate "server/service"

Posted on 2006-06-13
9
1,459 Views
Last Modified: 2008-01-09
Need some sample code or direction on how to Bypass NAT (Network Address Translation).


(Destop Application)---->NAT Router------>(Log Server)<--------(Client)

I want the "System" to work as follows:

(a)
The Desktop Application Authenticates to the Log Server, and Anounces its IP Adress when Ever it Changes with its ID.
(b)
The Log Server keeps track of the Desktop IP and ID.
(c)
Client connects Log Server and gives it an ID to Connect to, It receivec the IP Address of the Desktop Application.

In short I am not sure if this will work in practice.

What I need to do is be able to connect to the Desktop Application from the Client, even if the Desktop is behind a
NAT Router with a changing IP Address.

The internet connection can be either a Cell Phone Connection or a ADSL Line for the (Desktop Application).

Example Code would be Nice. Any Language will Do but preferably Java or Delphi.
Also need something that can withstand Load on the Billing Server, Where TCP Throughput is VERY VERY important.
"my thoughts are that the" Log server runs on Linux/FreeBsd where I can make use of an EXREMELY fast Database.










0
Comment
Question by:crestty
  • 4
  • 2
9 Comments
 
LVL 8

Accepted Solution

by:
colr__ earned 250 total points
ID: 16894753
You cannot bypass NAT, it is a network infrastructure in place mostly  for security reasons.

As long as your are plugged nto the router, and the router is configured to use NAT, then this is not bypassable.

colr__
0
 
LVL 8

Expert Comment

by:colr__
ID: 16894817
Since the router maps NAT addresses to local addresses, there isnt any way to go through the NAT with a public IP address - the only IP address that exists for each machine is a local domain address.

The only way round this would be to add a router table entry that maps a public IP address to a specific local machine, but a seperate public IP address and router entry would be required for each machine, essentially making this unmanageable.
0
 

Author Comment

by:crestty
ID: 16894962
mmm.


I must disagree,  for Peer to Peer applications Bypass NAT Routers.

Then I do not want to make use of peer 2 peer, I want to use the Log Server as a GATEWAY that knows the Destination.
But I guess this would mean that the Desktop would always keep a connection open to the LOG SERVER or else the NAT
Server will TimeOut the "Nat Structure" on the Router.

I am just guessing here. But surely it can be done.

If the Desktop connects to the Log Server via the NAT router: and keeps a structure similar to that of the NAT Router, would it not be possible to
communicate to the Desktop via the Log Server, if the Log Server knows the NAT structure.

I assume the Nat structure looks similar to this.

 Source IP : The Desktop IP
 Source PORT : The Desktop Port
 Dest IP : the Log Server IP
 Dest Port : the Log Server Listening Port
 NAT Port : The New Source Port/Fake, actual Open Port on the NAS Router.
 NAT IP: The Ip Address of the NAT Router.

Can one not then Establish a connection to the Desktop from the client if that structure is known via the Log Server?


0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Expert Comment

by:colr__
ID: 16895059
I dont think so, although you might want to post a similar question in the networking forum - youll probably get a better answer there.

colr__
0
 

Author Comment

by:crestty
ID: 16895089
Thankx, for the answer though, debate is hard via a Forum, lol. , it is not my intenention though.
0
 
LVL 8

Expert Comment

by:colr__
ID: 16895106
Not probs, a bit of debate never hurt anyone!

;-)
0
 
LVL 3

Assisted Solution

by:stimpyjcat
stimpyjcat earned 250 total points
ID: 16954163
The way to "bypass" NAT is to have a server which is reachable by both parties negotiate connections on behalf of both of them.  Let A, B be peers and C be the reachable server.  

A connects to C.
B connects to C.

A requests a connection to B (the problem of A knowing about B is a separate issue).
C uses its existing connection to B to request another channel.
B connects again to C (or multiplexes its existing channel).
C connects the channel on which A's connection request arrived to the new channel from B.
A and B can now talk to each other.

The networking complexity is increased because you now have 4 points of failure (A, B, C, and NAT) rather than just two (A, B).

It's generally not possible with NAT to have an entity outside the NAT make a direct connection to an entity within the NAT.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to execute a Python program and gather return output in Java 2 49
jsp login check 12 52
Java program running SQL query 5 46
Java List 4 31
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question