websocket will not connect from remote server

Viewed 5835

I have a web page to control a thermostat on a raspberry pi, and I'm running into difficulties when trying to get websockets to work from a remote client. It seems to work fine when on LAN however. I'm obviously missing something (and likely something basic), but I can't seem to figure out what it is.

The pi's local ip is 192.168.1.134. The web page (served from apache server) has the URL http://192.168.1.134:8010/thermostat.html. The page starts up some javascript, which then tries to connect to the pi's main program using websockets via ws://192.168.1.134:9000. (the server on the pi is running libwebsockets). The websocket comes up, and it seems to work fine. I then tried to connect via a remote client (a cell phone, where wifi was turned off) from http:\\23.239.99.99:8010\thermostat.html. The html/js files load fine, but the web socket attempts to connect to uri ws:\\23.239.99.99:9000, and this fials.

As far as I can tell, the NAT seems to be configured properly:

name           ext     ext    protocol    int     int     ip addr     interface
               port    port               port    port
               start   end                start   end

Thermostat3     8010   8010   TCP        8010   8010    192.168.1.134   eth3.1  
Thermostat5     8000   8000   TCP/UDP    80     80      192.168.1.134   eth3.1  
Thermostat_ws   9000   9000   TCP/UDP    9000   9000    192.168.1.134   eth3.1  

I checked, and the router does not have any firewalls set up, neither does my modem. I didn't install a firewall on the pi (I checked, and there's no odd iptables rule). Does anyone know what I'm missing?

--- EDIT ---

I'm still stuck on this. I called my ISP and they assure me there are no firewalls on their servers. Is there any way to tell if port 9000 is being blocked, and by who?

3 Answers
Related