How to use Cloudflare proxy?

I have a server which is deployed to google cloud and listening on some custom port. How can I use Cloudflare to proxy this server with my domain name purchased on CF?
4 Replies
andrew_nyr
andrew_nyr2w ago
if the port on your server is 80 or 443, a simple orange clouded DNS record pointing towards the IP of your server should work. If you want to use a different port other than 80/443 you need to create an origin rule to accomplish this goal. https://developers.cloudflare.com/rules/origin-rules/features/#destination-port
Cloudflare Docs
Available Origin Rules settings · Cloudflare Rules docs
The following sections describe the available settings in Origin Rules.
Nomad-Talent
Nomad-TalentOP2w ago
Can I have some guide to how to create an origin rule? I was able to create a record for the proxy. But not sure where to mention the destination ports.
andrew_nyr
andrew_nyr2w ago
sure. if you go to <domain> rules > overview > (then go to bottom, select next page) > you should see: "Change Port Send a request to the origin on a different port." Select that. then fill out the options you need with hostname, scroll to the bottom and fill in the port.
Nomad-Talent
Nomad-TalentOP2w ago
Okay, this makes a lot of sense. Thank you for your help.

Did you find this page helpful?