0

-Edit- I tried a few other online tools. One allowed me to put my up and port and it immediately triggered my app. However doing publicipaddr:port in chrome and firefox didn't trigger my app. But browsers do when I use 192.168.1.123. Why the heck can a site hit my ip:port but I cant with several different browsers.

I'm trying to figure out why my port is blocked. My C app uses addr.sin_addr.s_addr = INADDR_ANY; and works via localhost, 127.0.0.1, 192.168.1.123. I tried my public ip address and no luck (I also tried servering a page via nginx). I used two online tools and they both said my port is opened. I logged into my router and ran iptables -t nat -L and the port appears to be opened

DNAT       tcp  --  anywhere             123-456-789-123.my.isp.com tcp dpt:6457 to:192.168.1.123:6457

I pinged 192.168.1.123 from my router and it looks fine. Using windows firewall I allowed both A) the port range I want to be open and B) My app (nginx was already defined in there) to use any port it wants.

Yet when I use my public IP address I can't get a connection. How do I figure this out?

2
  • 1
    You are not quite clear about your network topology but I get the impression that the server running your app is behind a (residential) NAT router. Your problem could well be hair pin NAT as described here serverfault.com/a/557776/37681
    – HBruijn
    Oct 16, 2017 at 16:16
  • @HBruijn: That's it! I never heard of this and hairpin NAT has worked on all my rounters including this one but not when I changed the firmware to dd-wrt. Dammit. I can't tell if not supporting it is a feature or a won't fix issue (I don't want to jump through hoops to fix this I'll just test remotely)
    – user274
    Oct 16, 2017 at 16:26

0

You must log in to answer this question.