Setup source IP based restriction of website using Cloudflare

Hello Everyone,

My first post here, please excuse and direct me to the right place, if this question has already been answered.

We are developing our website on CMS and want to publish this site (all pages) only to a certain IP address for doing both functional and security testing. We have our own subscription of CloudFlare for multiple services including DNS, WAF, CDN etc. So I am trying to use Cloudflare to setup this source IP based restriction.

I am using the features like IP Access Rules, Zone Lockdown, Firewall Rules in Cloudflare to Block access to our site www.oursite.ai, if the traffic is coming from any IP source other than our company IP addresses. However since the DNS CName entry on cloudflare (pointing to the Hubspot URL) cannot be ‘Proxied’ in Cloudflare, none of the above rules are working.

I have created an A DNS record for oursite.ai (without the www) pointing to 2 IP address provided by Hubspot and set it to be ‘Proxied’. Since it is Proxied, it looks like all the IP rules are working and I get blocked if trying to access the site as oursite.ai (without the www) in the browser.

Have anyone tried to do this use case? Please help if anyone has managed to get a similar use case working. I’ve spoken to Hubspot support team as well, however as per them, there does not seem to be a straight forward way to do this

Thanks in advance

RDN

Hey, @RDNair :waving_hand: Thanks for reaching out. Admittedly, this one is beyond my level of technical knowledge and I wanted to give it a bump in case the community might have any thoughts. Like you, I didn’t find any good leads or relevant posts in my search. Not definitive by any means, but it may require more research from your end.

Best,

Jaycee

Hey Jaycee, did we ever figure out what the answer was to the question above? I think I am having the same issue today. lol

Hello, did you ever figure out your answer? I think I am having the same issue with my DNS connecting to HubSpot. I am having an issue with my www and it being proxied, and I am having HubSpot connect again and again and each time it’s taking an hour. I have changed the CNAME like HubSpot asked but I still run into the issue of www and how it should or should not be proxied? Please help.