?
Solved

TCP Cannot accept WAN requests

Posted on 2004-04-03
18
Medium Priority
?
468 Views
Last Modified: 2013-11-29
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.

Any suggestions?

Best,
Avery
0
Comment
Question by:SpecialA10
[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
  • 5
  • 4
  • 3
  • +2
18 Comments
 
LVL 11

Expert Comment

by:YohanShminge
ID: 10750178
What IP address are you using locally? 127.0.0.1 or something else?
0
 

Author Comment

by:SpecialA10
ID: 10750188
Locally the server is running on "localhost" which is 127.0.0.1

Best,
Avery
0
 
LVL 11

Expert Comment

by:YohanShminge
ID: 10750200
OK, so have you configured port forwarding to forward to 127.0.0.1 or localhost?  If so, you need to change that to your LAN ip, which can be determined by typing "ipconfig" at the DOS prompt.
0
Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

 

Author Comment

by:SpecialA10
ID: 10750239
Port Fowarding IS forwarding to my LAN ip!! Hence why i cannot figure out what is goign on!

Best,
Avery
0
 
LVL 11

Expert Comment

by:YohanShminge
ID: 10750247
So much for an easy solution! :-D

What happens when you try to connect to your LAN ip rather than localhost?  Does that work?
0
 

Author Comment

by:SpecialA10
ID: 10750255
Yes - when i run the client within the network...accessing the computer where the server is running (with its network address) that works PERFECTLY. The only problem is accessing via WAN!

sigh! ITS SO FRUSTRATING!

best,
avery
0
 
LVL 11

Expert Comment

by:YohanShminge
ID: 10750269
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?
0
 
LVL 5

Accepted Solution

by:
eddkhamou earned 1800 total points
ID: 10750604
Avery,

Are you physically outside of your network when trying to access it?  

Most routers will not let you go out to the internet then back in to the same network, thats a loopback connection.  Try dialing out to the internet or use another internet connection.

Ran into the same problem using PCanywhere.

Ed
0
 
LVL 10

Expert Comment

by:anupnellip
ID: 10750962
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
 

Author Comment

by:SpecialA10
ID: 10751227
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?

Thanks so much,
Avery
0
 
LVL 10

Expert Comment

by:anupnellip
ID: 10751381
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 .
0
 
LVL 27

Assisted Solution

by:pseudocyber
pseudocyber earned 200 total points
ID: 10756456
Why not have the inside clients connect to the LAN IP address?
0
 
LVL 5

Expert Comment

by:eddkhamou
ID: 10759385
Here's an idea.

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
 

Author Comment

by:SpecialA10
ID: 10759691
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.

Thank you all SO much!

Best,
Avery
0
 
LVL 27

Expert Comment

by:pseudocyber
ID: 10759872
Thanks Avery.  :)
0
 
LVL 10

Expert Comment

by:anupnellip
ID: 10763319
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 .
0
 
LVL 27

Expert Comment

by:pseudocyber
ID: 10764682
Well, like I said - why not have the internal clients connect to the internal LAN IP?  Could have a split DNS with private IP's inside and Public Natted IP's outside.
0
 
LVL 5

Expert Comment

by:eddkhamou
ID: 10769602
Avery,

Did some more research on this matter, since it still seems to be open.

http://www.dyndns.org/support/kb/loopbackconnections.html

Ed
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
I had an issue with InstallShield not being able to use Computer Browser service on Windows Server 2012. Here is the solution I found.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

743 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