• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Novark

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

8 posts in this topic

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.
0

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
[quote name='VildNinja' timestamp='1336458075' post='4938302']
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.
[/quote]

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.
0

Share this post


Link to post
Share on other sites
[quote name='Novark' timestamp='1336458911' post='4938307']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.
[/quote]
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)
0

Share this post


Link to post
Share on other sites
[quote name='VildNinja' timestamp='1336459467' post='4938310']
[quote name='Novark' timestamp='1336458911' post='4938307']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.
[/quote]
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 [img]http://public.gamedev.net//public/style_emoticons/default/sad.png[/img]

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)
[/quote]

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...
0

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
[quote name='hplus0603' timestamp='1336603337' post='4938801']
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.
[/quote]

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?
0

Share this post


Link to post
Share on other sites
[quote name='Novark' timestamp='1336640853' post='4938926']
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?
[/quote]
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.
0

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0