Change Cloudflare Connection Ports

Hello,

Firstly I apologise if my knowledge of the topic is a bit lacking as I am only researching this now. I am currently wanting to set up a second home server. It will be on the same network and accessible through port forwarding. Right now I have Cloudflare connect to my main one through ports 80 and 443.

My question is if I set up the second server to be accessible through ports (for example) 6001 and 6002 which to forward to its 80 and 443 how can I tell Cloudflare that for this IP, the same as the first server, it will need to connect to 6001 and 6002 for the second website, since by default if it tries to access 80 and 443 first it will go to the first website?

Cloudflare has a list of compatible ports.

Kindly, see here which are compatible and configure your application / website regarding the following about HTTP and HTTPS:

Thank you for the response. I have seen the ports and my first app uses port 80 and 443 on the specified IP.

My question however is say that I use 2052 and 2053 for the second application on the same IP, from where will I need to set to Cloudflare to know to use these ports rather than 80 and 443.

Depending on your web server, you would just need to setup your vhost (virtual host) file for your second app to listen connections and work on the exact ports 2052 and 2053. Allow them in firewall at your origin, if using it.
Moreover, check for thoose new open ports (2052, 2053) at your origin.
If all good, you could use Cloudflare proxy (:orange: cloud at DNS records) for your app via that ports.

I can confirm, because I use 80 and 443, while my other app is using 2083 and third app works on 2096, all on the same IP (using the same hostname/domain) and working with :orange: cloud as well (proxied through Cloudflare) and all are compatible with Cloudflare as written on the link :slight_smile:

2 Likes

This topic was automatically closed after 31 days. New replies are no longer allowed.