Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2006-06-13
9
Medium Priority
?
1,468 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
9 Comments
 
LVL 8

Accepted Solution

by:
colr__ earned 1000 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
The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

 
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 1000 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
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…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

670 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