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 "126.96.36.199").
-I start the server via an SSH shell. The server's socket binds on a given port and the ip address found above ("188.8.131.52", 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: "184.108.40.206", 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?
Edited by Geometrian, 04 January 2013 - 02:38 PM.