Connecting Tech Pros Worldwide Help | Site Map

problem with connection

  #1  
Old April 5th, 2009, 06:36 AM
Newbie
 
Join Date: Aug 2007
Posts: 3
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?
  #2  
Old April 10th, 2009, 04:14 PM
sicarie's Avatar
Moderator
 
Join Date: Nov 2006
Location: USA
Posts: 3,927

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.
  #3  
Old April 25th, 2009, 01:14 PM
NeoPa's Avatar
Administrator
 
Join Date: Oct 2006
Location: London - UK
Posts: 15,450
Provided Answers: 56

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.
  #4  
Old April 25th, 2009, 02:27 PM
Newbie
 
Join Date: Aug 2007
Posts: 3

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.
  #5  
Old April 25th, 2009, 03:02 PM
NeoPa's Avatar
Administrator
 
Join Date: Oct 2006
Location: London - UK
Posts: 15,450
Provided Answers: 56

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?
  #6  
Old April 25th, 2009, 08:18 PM
DonRayner's Avatar
Expert
 
Join Date: Sep 2008
Location: Canada
Posts: 494

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.
  #7  
Old April 25th, 2009, 08:38 PM
NeoPa's Avatar
Administrator
 
Join Date: Oct 2006
Location: London - UK
Posts: 15,450
Provided Answers: 56

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Weird problem with connection strings Harry Strybos answers 3 June 17th, 2007 09:45 PM
still having problem with connection of sql server sheena81 answers 3 June 5th, 2007 01:50 PM
problem with connection to MySQL jx2 answers 1 April 22nd, 2007 01:03 PM
Problem with connection Aahz answers 5 February 2nd, 2007 04:05 PM
Problem with connection pool DaM answers 5 November 19th, 2005 06:45 PM