Original Post
Let's say I have the following server.py and client.py: server.py: mySocket = socket.socket ( socket.AF_INET, socket.SOCK_STREAM ) mySocket.bind ( ( "", 2323 ) ) mySocket.listen ( 1 ) channel,details=mySocket.accept() client.py: mysocket=socket.socket(socket.AF_INET,socket.SOCK_STREAM) mysocket.connect( ('85.84.83.82',2323) ) '85.84.83.82' is my current dynamic IP. But whenever I execute those 2, I get in 1-2 seconds a 'Connection refused' error from client.py. Now I know that it finds the IP, because if I give another random one, it timesout. But why the connection is refused? If I substitute it with '127.0.0.1' it works fine. But as soon as I enter the actual IP, it doesn't. Any ideas on why this is happening? Am I missing something?