Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Don't forget to read Tuesday's email newsletter for your chance to win a free copy of Construct 2!


Peer-to-peer connection issues (TCP/IP)


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
8 replies to this topic

#1 Novark   Members   -  Reputation: 133

Like
0Likes
Like

Posted 07 May 2012 - 10:44 PM

I'm trying to test my server/client architecture with a friend (Let's call him "Friend A"), and have already determined that the code is working correctly, since I am able to join my friend when he hosts.

For whatever reason though, he can't connect to me when I host. I've tried a number of things, but nothing seems to work.

I've tried bypassing my router entirely and connecting directly to the modem, but he still wasn't able to connect when I hosted.

I've added the necessary ports to the inbound/outbound lists on my firewall as well (while still connecting directly to my modem), and I've even tried disabling any anti-virus software that might have been messing with things.

I can't really think of anything else that could be wrong with my setup. Just for kicks, I also tried the same steps using UDP, but I got the same results. I could connect to him, but he couldn't connect to me.

I got another friend to help test, as well. We'll call him "Friend B".

I can't connect to "Friend B", nor can he connect to me.

"Friend A" can't connect to "Friend B", however, "Friend B" can connect to "Friend A" (just as I can).

So the only person who can apparently host, is my "Friend A", despite my efforts to open up my computer to incoming connections. I haven't asked my "Friend A" to do any sort of configuration on his end. He's connected to a router, and both myself and my "Friend B" are able to connect to him just fine.


Has anyone else ever encountered a similar problem? Any ideas as to what might be causing this? Please let me know if I can clarify anything, or provide additional details.

Sponsor:

#2 VildNinja   Members   -  Reputation: 457

Like
0Likes
Like

Posted 08 May 2012 - 12:21 AM

Can you connect to your own public IP? When I do network I always first host the connection on my computer. Then first tries to connect to localhost, if that works i connect to my LAN IP, and finally connect to my public IP.

But your problem most likely lies in A) not having forwarded all the ports, or B) being behind some external firewall/proxy from your ISP.

#3 Novark   Members   -  Reputation: 133

Like
0Likes
Like

Posted 08 May 2012 - 12:35 AM

Can you connect to your own public IP? When I do network I always first host the connection on my computer. Then first tries to connect to localhost, if that works i connect to my LAN IP, and finally connect to my public IP.

But your problem most likely lies in A) not having forwarded all the ports, or B) being behind some external firewall/proxy from your ISP.


Nope. I wasn't able to connect to my public IP - which I found quite strange as well. 127.0.0.1 works - as it clearly should.

With regards to the ports, I've 'forwarded' all of the ones that I'm using, and I've even tried disabling my firewall entirely (not the best idea, but it was a good test at least).

My concern is that you are correct and that it's my ISP doing something silly and preventing me from being able to test things properly. I've never had an issue with them before though, and I've done other stuff locally (such as running an apache server on my local machine) that has never given me trouble when connecting to my public IP.

#4 VildNinja   Members   -  Reputation: 457

Like
0Likes
Like

Posted 08 May 2012 - 12:44 AM

My concern is that you are correct and that it's my ISP doing something silly and preventing me from being able to test things properly. I've never had an issue with them before though, and I've done other stuff locally (such as running an apache server on my local machine) that has never given me trouble when connecting to my public IP.

Have you ever tried hosting any non-HTTP based services on your computer? or services on other ports than port 80?
Some proxies limit access to HTTP, but I never heard of any one doing it on incoming traffic only.. But sorry, that's kind of how far my network knowledge go :(

Try hosting a random game. preferably one where your friends can connect directly to your IP, without entering a lobby (lobbies tend to do some nifty NAT tricks)

#5 Novark   Members   -  Reputation: 133

Like
0Likes
Like

Posted 08 May 2012 - 05:26 AM

My concern is that you are correct and that it's my ISP doing something silly and preventing me from being able to test things properly. I've never had an issue with them before though, and I've done other stuff locally (such as running an apache server on my local machine) that has never given me trouble when connecting to my public IP.

Have you ever tried hosting any non-HTTP based services on your computer? or services on other ports than port 80?
Some proxies limit access to HTTP, but I never heard of any one doing it on incoming traffic only.. But sorry, that's kind of how far my network knowledge go Posted Image

Try hosting a random game. preferably one where your friends can connect directly to your IP, without entering a lobby (lobbies tend to do some nifty NAT tricks)


To my recollection, I've had other things working where my friends were able to successfully connect to me via my public IP address. Sometimes it won't work, and I'll have to join one of them, but that might be due to other factors since I'm usually connected via a router.

In this one instance with my server/client architecture, however, it doesn't seem to work unless I join my friend.

It's driving me nuts, because I've eliminated the possibility that it's something with my router / firewall, and I don't know else I can try at this point...

#6 hplus0603   Moderators   -  Reputation: 5532

Like
0Likes
Like

Posted 09 May 2012 - 04:42 PM

I'm pretty sure it is related to your firewall, or perhaps the firewall of your ISP. Also, your Friend B probably has the same (or a similar) problem.

Get yourself access to a UNIX shell somewhere outside of your local network. Then try to "telnet your-public-ip your-port" and see if it connects, or doesn't connect. If it doesn't connect, it's a firewall/port-forwarding problem.

enum Bool { True, False, FileNotFound };

#7 Novark   Members   -  Reputation: 133

Like
0Likes
Like

Posted 10 May 2012 - 03:07 AM

I'm pretty sure it is related to your firewall, or perhaps the firewall of your ISP. Also, your Friend B probably has the same (or a similar) problem.

Get yourself access to a UNIX shell somewhere outside of your local network. Then try to "telnet your-public-ip your-port" and see if it connects, or doesn't connect. If it doesn't connect, it's a firewall/port-forwarding problem.


I think I can rule out the possibility that my ISP is at fault, since I have never had problems with them before, and my "Friend A" also has the same ISP and I'm able to connect to him just fine.

Please forgive my ignorance on the subject, but what exactly would be the difference between using a -telnet command versus getting my "Friend A" to try to connect to me? Is it simply to eliminate the possibility that there's something on my friend's side of things that could be wonky, or is there another benefit to using a UNIX shell to test?

#8 VildNinja   Members   -  Reputation: 457

Like
0Likes
Like

Posted 10 May 2012 - 03:18 AM

Please forgive my ignorance on the subject, but what exactly would be the difference between using a -telnet command versus getting my "Friend A" to try to connect to me? Is it simply to eliminate the possibility that there's something on my friend's side of things that could be wonky, or is there another benefit to using a UNIX shell to test?

To isolate the problem. By using telnet instead of your own client, you eliminates the possibility that an error in your client can cause the problem. You can also run telnet from windows, but they disabled it by default (since Vista I think). Google it if you want to enable it again - I can't remember where it's done.

#9 hplus0603   Moderators   -  Reputation: 5532

Like
0Likes
Like

Posted 10 May 2012 - 12:55 PM

An alternative is to download and install putty, which has a telnet mode, and lets you enter the port number you want to connect to.
The whole point is, as Feral Ninja says, to isolate the source of the problem.
Also, with an easily controlled session initiator, you can more easily look at the set-up of the connection (the initial SYN packet and any response you might get) in Wireshark to try to debug what's going on.

enum Bool { True, False, FileNotFound };




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS