Jump to content

  • Log In with Google      Sign In   
  • Create Account

Connecting to Remote Host from Home Machine


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
1 reply to this topic

#1 Geometrian   Crossbones+   -  Reputation: 1601

Like
0Likes
Like

Posted 04 January 2013 - 02:36 PM

Hi,

Disclaimer: About 80% of what I know about networking comes from reverse engineering.

I am trying to write a basic client-server-model networking library in Python.  It is available FOSS here. I have tested this library with a client and server on my local machine, but now I want to try it in the Real World.

For testing, I have SSH access to two exterior hostings--one on webfactional and one at a university, both running Linux.  I can run a server from either place through a remote shell, but I cannot connect to it.

In my test (using values from the webfactional hosting):
-I open an SSH shell.  I find the host's name through "hostname" (it is "web15.webfaction.com"), and then find an ip address through "host <name>" (it is "108.59.4.81").
-I start the server via an SSH shell.  The server's socket binds on a given port and the ip address found above ("108.59.4.81", 6317).
-I start the client on my local machine.  The client's socket attempts to connect to the ip address above and the same port (so again: "108.59.4.81", 6317).
-The connection never takes; the client times out, and the server appears completely oblivious--as if no incoming connection was attempted.

I don't know if my approach for this test makes any sense, but it's my best guess.

If it's not something silly like that, I suspect the problem has to do with the NAT, since very similar code worked at my previous residence under a different network setup (though I don't know how it was tested).  However, I don't know what could actually be causing such a tie-up, unless it is a NAT on the server's end.

I'm really confused on the whole thing.  I'm not looking to set up a peer-to-peer connection per-se, although I would like to allow those behind a NAT to host a server.  Can someone clarify and explain this mess?

Thanks,
-G

Edited by Geometrian, 04 January 2013 - 02:38 PM.

And a Unix user said rm -rf *.* and all was null and void...|There's no place like 127.0.0.1|The Application "Programmer" has unexpectedly quit. An error of type A.M. has occurred.

Sponsor:

#2 hplus0603   Moderators   -  Reputation: 5707

Like
0Likes
Like

Posted 04 January 2013 - 06:29 PM

Your problem is most likely NAT, and/or firewalls that work much like NAT (with connection tracking,) on both the university side and the cheap webhost side.
You solve this by getting a real host that does not NAT/firewall your programs -- typically, a VPS or similar. That server can either be the game server, or it can be a NAT introducer for the actual server.
More information about NAT punch-through is found in the FAQ.
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