Transparently forward traffic from 443 to another port on my origin server


I just joined Cloudflare by transferring my domain from Google Cloud DNS.

I took a look at the Page Rules features for websites, which are awesome. I’m looking to do something specific, that perhaps is not implement yet, or maybe I didn’t find how to do it.

First of all, I’m an individual who is using my domain to access my hosted Home Assistant instance in my house. Here, I have a situation which I suppose does not only happen to me:

My ISP blocks me from using the ports 80 and 443. This basically means I can’t host any server on these ports, which is quite sad. But I can use any other port freely.

For example, this is why I’m using rather than the normal 443 currently. The thing is, with normal reverse proxies (like NGINX), it’s not so complicated to configure it to act as a transparent forwarding to another port in a given server.

I would like, for example, to setup a Page Rule which would transparently forward traffic from port to, thus allowing me to use my HTTP (HA) server as if it was being hosted in port 443.

Actually, with this, I could potentially simply set the destination as https://:8123, or even http://:8123 so that I would not need to manage the certificates under my HA, and let everything in Cloudflare’s reverse proxy instead.

Any clue? Thanks you guys anyway!

What I think that is missing specifically would be some more options in Transform Rules for URL Rewrite, like Host and Port instead of only Path and Query.

You can’t actually forward between port but what you can use is cloudflare tunnel that way you don’t need port 443 and 80 open in your ISP and you can still access your home asistent securely

Do you have a static ip? If not then how you will access the home asistent

1 Like

Thanks for the reply! I will try to find this Cloudflare tunnel.

And, yes, I do have a static IP.


But regardless, it would be awesome to have the ability of rewriting the host and port instead of just the path and parameters for the URL in the Tranform Rule URL Rewrite.

Is this the right place to make such a feature suggestion?

Rewrite Host is only available on Enterprise plans due to the potential for abuse, such as scraping.

How about Rewrite Port then? :slight_smile:

Good question. That would be awesome!

@smarsh would know if that’s possible.

Not without a Worker currently. We’re working on it though :slight_smile:

1 Like

You can specify a port on a bulk redirect, i wonder if you can redirect to Worth a try if thats the type of thing you’re looking to do (it wont be transparent, however).

Thank you a lot guys!

About the redirect: no… that’s not what I’m looking for, but thanks for the suggestion anyway. I think that for now, the only option is Argo Tunnel.

I found some add-ons which makes this configuration in Home Assistant very easy:

I haven’t tried yet, but probably they work. :slight_smile:

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.