remoting over router/NAT
- From: mihaidu@xxxxxxxxx
- Date: 19 Jan 2007 09:16:38 -0800
Hi,
I want to get my remoting app to work over a router with NAT. The
client should be able to conect to the server which lies behind the
router. I have configured the NAT to direct my packages by the server
port which i use (9001), directly to the server (which has a non-unique
internal IP, that's why i need NAT).
After the configuration was done, it didn't work. So I used a packet
sniffer to see what happens. I traced a successfull connection to the
server from within the network (no NAT in action, local adresses) as
well as a connection trial from outside, through the router/NAT. (Ask
me for the ethereal .cap capture files)
For the local connection, which works, the client connects to the
server from it's local IP adress using a **local port** which seems to
be randomly chosen. The server port is the configured one (9001). When
the server sends packages to the client it uses it's randomly chosen
port to adress it. So i see something like:
192.168.1.101 -> 192.168.1.201 1051 -> 9001 ...
192.168.1.201 -> 192.168.1.101 9001 -> 1051 ...
....
and it goes on leading to a successfull connection (IP ending in 201 is
the server).
With the remote connection over NAT, which doesn't entirely work, the
packages from the client arrive in a similar manner, so from a local
port of the client to the configured server port (9001). The NAT works
in this direction. The problem seems to be that the packages from the
server to the client don't make it over the NAT. The server sends
packages to the port of the client from which the communication was
initiated. As i don't know which port will be chosen by the client, I
can't configure the NAT to redirect this port also. Getting no answer,
the client seems to be retrying with different ports. I see something
like this:
X.Y.Z.Q -> 192.168.1.201 4740 -> 9001 ...
192.168.1.201 -> X.Y.Z.Q 9001 -> 4740 ...
(some retrials, then after a while:)
X.Y.Z.Q -> 192.168.1.201 4743 -> 9001 ...
192.168.1.201 -> X.Y.Z.Q 9001 -> 4743 ...
(and so on, with changing client ports)
After a few retries the client throws a timeout.
How can i configure remoting to always use the same client port, so i
can tell NAT about it? Or is there another solution to my problem?
Thanks
Mihai
.
- Follow-Ups:
- Re: remoting over router/NAT
- From: Spam Catcher
- Re: remoting over router/NAT
- Prev by Date: Using Layout Manager in UIP Application Block
- Next by Date: Remoting x Method Overloading
- Previous by thread: Using Layout Manager in UIP Application Block
- Next by thread: Re: remoting over router/NAT
- Index(es):
Relevant Pages
|