tcpClient switching between networks

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I am building a tcpClient which is supposed to connect to a 3rd party server using a private point-to-point connection. Our internal network is 192.168.16.0 and the private network is on the 192.168.64.0 subnet. We have a webserver which will recieve requests, contact the private server, get a response and send it back to the client. The webserver has an IP on the internal and private network (it essentially is straddling both networks). I have added a static route on the webserver sending all requests for a certain IP to the private network.
From the webserver, I can successfully ping the private 3rd party server via our private network. When I run the tcpClient it tries to connect via the internal network even though the connecting IP should route through the private network. Why would pinging route properly but the tcpClient not? I don't see anyway to tell the tcpClient to use the private gateway/network.

If anyone has done anything similar I would appreciate any suggestions.
 
Hi Nic,

Mainly this is in my opinion not a dotNet problem.

The 192.168.xxx.xxx IP adres group is as well as the 10.xxx.xxx.xxx reserved
for private intern network use (It is never used on Internet).

Your webserver should also have an external IP adres, when it is reachable
from the outer world.
(That should be pingable as well from intern connections when that is not
blocked by a router).

I hope this helps?

Cor
 
Back
Top