问题
I am having an issue with my socket connection. When I replace my no-ip address with "localhost" it works fine, but as soon as I put in my no-ip address, it cannot connect. I have forwarded the port from my router (port 12345 TCP and UDP forwarded to my local IP address 192.168.1.116). I don't understand why it would work with "localhost" but not with "myaddress.no-ip.org". It was of my understanding all you had to do was forward the port on your router to your local IP address.
回答1:
You can't forward your internal IP address. A 192.168.x.x address is only usable on your internal network. You need to forward you external address. http://whatismyipaddress.com/
回答2:
OK, here is the most probable solution to the problem. The Modem that I have from Time Warner (RoadRunner) has a built in modem. I have to get them to bridge the connection so it passes through the router. My router was looking for something to come in on port 12345 so it could direct it to my computer. The problem was that TWCs router wasn't forwarding it to my router. After bridging the connection, it should just pass through the modem to my router.
来源:https://stackoverflow.com/questions/11405650/socket-connection-not-working-with-no-ip-address