Solved

TCP Cannot accept WAN requests

Posted on 2004-04-03
18
463 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
  • 5
  • 4
  • 3
  • +2
18 Comments
 
LVL 11

Expert Comment

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

Author Comment

by:SpecialA10
Comment Utility
Locally the server is running on "localhost" which is 127.0.0.1

Best,
Avery
0
 
LVL 11

Expert Comment

by:YohanShminge
Comment Utility
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
 

Author Comment

by:SpecialA10
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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 450 total points
Comment Utility
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
Comment Utility
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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:SpecialA10
Comment Utility
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
Comment Utility
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 50 total points
Comment Utility
Why not have the inside clients connect to the LAN IP address?
0
 
LVL 5

Expert Comment

by:eddkhamou
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks Avery.  :)
0
 
LVL 10

Expert Comment

by:anupnellip
Comment Utility
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
Comment Utility
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
Comment Utility
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

NetScaler Deployment Guides and Resources

Citrix NetScaler is certified to support many of the most commonly deployed enterprise applications. Deployment guides provide in-depth recommendations on configuring NetScaler to meet specific application requirements.

Join & Write a Comment

#Citrix #Citrix Netscaler #HTTP Compression #Load Balance
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
Viewers will learn how to properly install and use Secure Shell (SSH) to work on projects or homework remotely. Download Secure Shell: Follow basic installation instructions: Open Secure Shell and use "Quick Connect" to enter credentials includi…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

728 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now