TCP Cannot accept WAN requests

Hi Experts,

I have a server and client (both written in C#/.net). When i run the server and do a netstat, I can see that the port is being listened too. When i attempt to access the server via the client from inside my network or on my local machine, it works perfectly. When i attempt to access it via wan-ipaddress:port, the server doesnt seem to be accepting any connections.

So essentially, i can connect inside my network but not outside. I am behind a router (but port forwarding is set correctly and firewall is disabled). Also, I have tried this while not behind a router and it still can only connect from the same machine that the server is running on.

Yes, I know the feeling! When you removed the router from the mix did your computer pick up its new public address before you tested? If it did, and it still didn't work, then perhaps your ISP is blocking certain ports. Can you change the port number to something common, like 80, or 110?

this could be the problem with your server not having a return path to the internet . Have you set your default gateway on the
server to point to this router ?? Can u ping a system on the internet from inside your network .
Do a tracert -d on a test system which you may use to connect from ouside your network . if the route is through this router of yours then I think connectivity part is OK .

0

SpecialA10Author Commented: 2004-04-04

Hi Guys,

Thanks for all your efforts thus far - I have not realized the "loopback connection" issue. The situation has changed like this:

1)I can access the server running the client with there server IP as localhost
2)I can access the server running on the same network.
3)Someone completely outside my network can access the server via its WAN IP
4)someon INSIDE the network can NOT access the server via its WAN IP

This must mean the problem is infact a "loopback" connection. -> I must - must - must - must get around this. How do i do it?

What you need to do here is to have route on each m/c to this wan IP address , if the router which forwards the IP is not the default gateway for all the computers on your network .
eg if the said router is the default gateway for all your clients the site will open with the wan IP .

If you dont want to make the router the default gateway then you can use this route add command on all the PC .

route add -p WAN_IP ROUTER_IP

so next time they use they use the WAnN IP they will be routed through the router .

What if you set up a switch or hub before that is setup before the router.

I assume your network looks like this.

internet>DSL/cable modem>router>internal network

You didn't mention if you had a DSL/cable modem so just remove it from the explanation if you don't have one.

you would set up the hub or switch before the router.

internet>hub/switch>DSL/cable modem>router>internal network

you could then attach a computer with two network cards, one connected to the internal network and the other to the hub/switch.

I never done this so I don't know how or if it would work

Ed

0

SpecialA10Author Commented: 2004-04-05

Hi Guys,

Thanks for all your help. In the end i accepted the answer about loopback connection - with the most points because that is what led to me being able to solve the problem. The answer about having internal clients connect to the LAN IP got 50 points because that is EXACTLY what I am ending up doing, although, I did think of it myself before the answer was posted - I do think it warrents some points.

Well somehow I cannot accept this . I have seen 100s of network & if the router is configured properly giving the wan address from the internal network will work . It is not a loopback , but NAT is translating the wan IP request to the internal ip . Unless a firewall or access list denies this ,it is always possible to access the public IP from the internal netwrok .