Page rules different port, special procedure


#1

Hello there,

My provider currently bloc port 80 for residential. and it’s ok.

I would like to use page rules to bypass this, don’t juge, I need to host to work when I’m at work.

for security reason I will not publish my real IP so … if I type http://45.44.234.101:8884/ I got into my home server and it’s work

in CF I create a page rules for my domain that actualy point to CF
mydomain.com
Permanent redirect to http://45.44.234.101:8884/

this does’t work , I add a A record with my IP and does’t work, I currently have dynamic IP, I may use dyndns or other services since CF does’t offer this kind of services.

I think it’s something to do with Dns since It’s dynamic IP.

Someone can help with this ?

thanks


#2

Ports are restricted to

For requests made via HTTP:

80
8080
8880
2052
2082
2086
2095

For requests made via HTTPS:

443
2053
2083
2087
2096
8443

I am not sure if it’s the same for Page Rules. May be worth a try.


#3

Yep it’s the same for Page Rules, you can however try with Workers, though they cost a little bit to use.


#4

Make sure the A record for your home IP is a grey-cloud so Cloudflare don’t proxy the traffic, this name must be different from the mydomain.com record name you want to use to access the site initially as that must be orange-cloud for the Page Rule to work! e.g.

home.mydomain.com : A record for your dynamic IP (GREY Cloud)
mydomain.com : A record with any IP (doesn’t matter as Cloudflare Page Rule will issue redirect from it) (ORANGE cloud)

Then add a page rule matching mydomain.com/*, which issues a redirect to home.mydomain.com:8884 or whatever.

You can update the dynamic IP associated with home.mydomain.com directly at Cloudflare. Just have a Google and you’ll see lots of simple scripts people have written to do so from cron jobs etc. If you don’t want to do this then set up a dynamic hostname with someone like dyndns, no-ip etc and make home.mydomain.com a CNAME pointing to mdomain.dyndns.com or whatever you choose as your dynamic hostname.


#5

Cool thanks

it’s working now… the only thing is that it’s still a redirect and people can see the IP:port in the url instead of mydomain.com… it’s there a way to avoid this ?

it’s CNAME Flattening that cause this I think…


#6

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