Connecting Tech Pros Worldwide Help | Site Map

problem with connection

Newbie
 
Join Date: Aug 2007
Posts: 3
#1: Apr 5 '09
I'm testing a simple c# application with server and client both working on the same machine ,client try to connect to server using external ip but i keep getting this message "No connection could be made because the target machine actively refused it".
I port forwarded my server manually and using UPNP and checked the port and it's open ,all firewalls(windows,software and router) are disabled, utorrent is working already on my machine using UPNP.
so i don know the possible reasons of failing to connect .any suggestions?
sicarie's Avatar
Moderator
 
Join Date: Nov 2006
Location: USA
Posts: 3,929
#2: Apr 10 '09

re: problem with connection


I'd get on the device that's doing the forwarding and actively telnet to the port

telnet <ip> <port>

If that connects, then you know the port is open, and there may be an issue with credentials or something in the app.

Otherwise, you know the issue is somewhere between your forwarding device and the firewall.
NeoPa's Avatar
Administrator
 
Join Date: Oct 2006
Location: London - UK
Posts: 15,653
#3: Apr 25 '09

re: problem with connection


In my experience, that error message indicates that a router/firewall device has stepped in and refused the connection. Not Windows Firewall on a PC, but a specific device. I hope that helps.
Newbie
 
Join Date: Aug 2007
Posts: 3
#4: Apr 25 '09

re: problem with connection


thanks for replying but i made sure all kinds of firewalls turned off and telnet is working fine.
but maybe it's something else u know i was trying to access my ftp site from my machine using my external IP and it didn't work and someone told me the router doesn't forward connection from the machine itself and i tested it using net2ftp and it works.may be it's the same because the application is working fine with local ip.
NeoPa's Avatar
Administrator
 
Join Date: Oct 2006
Location: London - UK
Posts: 15,653
#5: Apr 25 '09

re: problem with connection


I'm not sure I follow you, but let's be clear.

The router / firewall needs to be running. The firewall needs to be on to reroute the traffic that it gets on the external IP address and port, through to port 25 on your internal PC. This is NAT (or Network Address Translation) and needs to be configured correctly on the firewall / router. Does that make sense?
DonRayner's Avatar
Expert
 
Join Date: Sep 2008
Location: Canada
Posts: 494
#6: Apr 25 '09

re: problem with connection


Someone correct me if I'm wrong on this but.... I'm pretty sure that a router won't connect two internal IP's together on an external IP, As far as the router is concerned, even if you are using different ports it's still the same address and so you are asking it to connect to itself and that just won't happen.

You may be able to get away with it if your ISP has supplied you with more than one IP address and your router is setup to use one for outgoing and another for incoming.
NeoPa's Avatar
Administrator
 
Join Date: Oct 2006
Location: London - UK
Posts: 15,653
#7: Apr 25 '09

re: problem with connection


Quote:

Originally Posted by DonRayner View Post

Someone correct me if I'm wrong on this but...

That all depends on how the device is configured. It's certainly possible to telnet to a router's external IP address, even from the internal network.

Consider also, that there can be more than one routing device in more complicated networks sometimes. More often found in commercial environments than in homes to be sure, but the scenarios do exist.

These situations can get quite complicated, but the configuration of the rules etc which convert external to internal seem to be the important stuff. That does depend heavily on the specific device though, so general advice is always complicated.
Reply