Is it possible for socket.io to listen on multiple ports in one server?
Background - I need to satisfy two problems:
1.Some cooperate & other closed networks block all traffic which does not use port 80.
2.Some anti viruses block websocket traffic on port 80. Port 4000 is the safest port to use.
I therefore need to my node server to be able to use port 80 and 4000 simultaneously. Has anyone experienced similar problems? How did you solve it?
Thank you.
Suppose your process is listening on port 4000, it's my understanding you can use iptables to internally forward requests for port 80.
# iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 4000
/edit got the ports the wrong way around.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With