Home > database >  Which is best port to use for secure Chat server to allow general firewall bypass (port 443 is alrea
Which is best port to use for secure Chat server to allow general firewall bypass (port 443 is alrea

Time:08-24

so I developed a public chat application which will run on a node server using secure socket.io.

That server, which only has a single IP address already has ports 80 / 443 occupied.

So I need to find the next best port to use for the chat server. I wonder is there a recommended next best port that will allow most firwalls to communicate to? I know for example using ports like 21 (FTP) will normally be blocked. And is it best to pick one above 1024 or below?

thanks

Sean.

CodePudding user response:

In general 8443 will be the "alternative port for HTTPS", but you are still at risk of being filtered.

The proper solution should be to run proxy like nginx on port 443 and provide access to various applications based on the hostname, not the port. In example you can configure it to run your current app when user reaches https://example.com and chat app when user reaches https://chat.example.com.

Here is an example article showing how to do it https://www.manuelkruisz.com/blog/posts/nginx-multiple-domains-one-server

The idea is that each app runs on different internal port on the server, and proxy running on port 443 picks which app the request should be routed to based on the hostname.

  • Related