1.

Solve : TcpListener only working locally?

Answer»

Ok, so I have some code, a server and a client, which connect together just fine on a LOCAL network or single COMPUTER. But when I try to connect to it over the internet, it just SAYS "The target machine actively refused the connection."

I'm working in vb.net 2008.

What I'm wondering is, what IP address am I supposed to feed the tcplistener and the tcpclient? When I have them running on the same computer, I give them both 127.0.0.1 and they connect fine.

They are connecting/listening to the same port (500)



you would need to give the TCP Listener the ip address you have been assigned by your ISP - not the usual 192.168.x.x but something specific to your ISP account - such as 71.168.123.124ok, for the purposes of this, lets say i went to www.whatismyip.com and they said it was 1.2.3.4

I feed this into my program, the tcplistener rejects this (apparently you can only use the local address)

I feed it into my tcpclient, this tries to connect to it while the tcplistener is running, however, it is also rejected, "the host machine actively refused the connection."

What is BLOCKING it? when i did this i tried EVERYTHING, closed all the firewalls etc...



Discussion

No Comment Found