Secure Websocket (wss / TLS) behind router failing

1k views Asked by At

I just want to preface this question by saying that I have most of this working but that I've been scouring the internet for days trying to find documentation for this one piece of the puzzle.

Here's my stack:

- Router port forwarding (80,443,8080)
- Laptop (DHCP)
- stunnel (443 -> 8080)
- websocket (8080)

Router port forwarding:

TCP 80, 443, 8080 -> 192.168.1.x

Laptop firewall:

sudo ipfw add allow tcp from any to any 443

Stunnel:

[https]
accept  = 443
connect = 8080

Websocket binding:

('0.0.0.0', 8080);

Client:

ws://hostname:8080/
wss://hostname:443/

Here's what's working so far:

When connecting from my computer: Both secure wss and non secure websocket connections succeed. The websocket reports that I've connected from 127.0.0.1.

What is not working:

When connecting from my phone via 3g (outside my router): Non secure works, secure does not.

Chrome, Safari, nor Firefox provide any debugging for Websocket connections so I have no idea what the problem is.

Any help is appreciated.

Zach

0

There are 0 answers