I am trying to get a simple TCP server running on my server. I am using echoserv.py and echoclient.py on the Twisted examples page. When I run echoserv.py on the server, I can connect fine using the following in echoclient.py:
reactor.connectTCP('localhost', 8000, factory) <- for a localhost connection
reactor.connectTCP('192.168.0.250', 8000, factory) <- for a lan connection
but when I try to connect remotely via the Internet, I use the following line in echoclient.py:
reactor.connectTCP('mydomain.com', 8000, factory)
However when I try to run echoclient.py, there is a pause, and then I get:
connection failed: User timeout caused connection failure.
I know it is doing something with my domain, because when I do a random domain, I get:
connection failed: Connection was refused by other side: 111: Connection refused.
All my ports are configured correctly for port 8000, and I'm sure it's not my ISP blocking the ports (I can use random ports all the time with other applications). I've also tried using ports besides 8000, but no avail. Here is the port fowarding line in my router page if it helps:
[X] tcp_server 192.168.0.250 TCP 8000/8000 always edit delete
Any idea why this is happening?