Jump to content

TCP Working over Localhost but not over Internet


Mason
 Share

Recommended Posts

Ok, so this is my script I have been working on for a while now. I have tested it on my own computer with localhost, and now that its ready for testing over a real connection it won't work...

I have made sure no firewall is running on either computer.

I have made sure I have the right IP address when I try to connect.

I have made sure the tester has the client running.

Maybe you could point out something I am missing, or something I need to remove.

CompleteControlServer.au3

CompleteControl.au3

Link to comment
Share on other sites

Are you behind a router or proxy?

Yes, I am behind a router. Is this a problem?

EDIT: Larry, I was actually using _GetIP(), must have been a wierd error in the uploading?

Edited by Mason
Link to comment
Share on other sites

won't work over internet

verify client and server tcp/ip connectivity (can you google?)

verify that the application is bound to the interface / port you believe

netstat -a -n
look for LISTENING applications.

Ensure that you have icmp connectivity from client to server ( can you ping )

this can catch misconfigured routes, dns issues, some firewall / router / NAT issues.

attempt client connect to another process running on the same server; i.e. fire up a

known good server (ftpd /sshd / telnetd ) ;;;whatever - just so you can test against a known

server w/ a known client - we're still debugging connectiivity, not the application at this point.

If the above isn't feasible, or you're comfortable w/ the belief that your server is indeed listening on the IP addr / port that you believe it is, then try to telnet directly to the address / port combination:

using ms telnet

telnet ip_addr port
if you have putty, you can use RAW mode for this.

Your issue is likely either a hardware router port forwarding issue - if the router doesn't have a rule it drops the packet, leading your client off into /dev/null, OR a software firewall issue, where the firewall is doing the same thing.

Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.

Link to comment
Share on other sites

If I am running the client(CompleteControl.au3) then it should be able to connect to the server regaurdless of any of my port forwarding issues, because port forwarding is only an issue for servers correct? The person that I was testing with, who had the server at the time, does not use a router for his connection.

I will check to see if the server is actually listening to the correct ip/port now according to flyingboz's explanation. I'll update the results shortly.

EDIT: After running the server on a friends computer with no router, we looked in netstate -a -n and nothing was LISTENING on port 1337. So we found the problem that it isn't listening on the port assigned, but why not and how should we go about fixing this?

Edited by Mason
Link to comment
Share on other sites

You cannot bind to a WAN ip... you need to TCPListen on your NIC's IP. Your router will need to forward that port to your IP.

Lar.

But see, the server is running on a friend's computer who is not running a router...
Link to comment
Share on other sites

Larry, from what testing flyingboz and myself have done, it seems that there is nothing wrong with the server(yet), but the TCPListen() doesn't seem to want to bind a IP Address that isn't localhost.

what's the output of "netstat -na" before and after TCPListen()?

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

The same, TCPListen isn't even adding it to netstat, it returns -1 anytime you try to bind anything besides 127.0.0.1

Well, then you should open a "Bug Report"...

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...