How do I find CloudFlare CDN Edge Server IP address for local testing of my CloudFlare CDN configuration?

I want to test and route traffic to Cloudflare CDN Edge servers locally to test my configuration for my website.

I will manually update my host file to route traffic from my local PC locally (to avoid affecting actual user traffic).
I need the Cloudflare Edge Server IP address for this – I am currently in Korea, but will be in Singapore soon.

What is the Cloudflare CDN Edge Server IP that I should associate my website domain with?
Or I mean – how can I find the Cloudflare CDN Edge Server IP address, or whom should I reach out to obtain the Cloudflare CDN Edge Server IP

Thank you

Cloudflare operates an anycast network so “locally” automatically means “the nearest Cloudflare data centre to you”.

https://www.cloudflare.com/en-gb/learning/cdn/glossary/anycast-network/

1 Like

Hi There,

I have done a little more research and was advised that I cannot actually obtain the IP address of the edge servers?
I wanted to configure these in my host file so that I can perform testing locally from my PC

Attached the response from ChatGPT as well, for your advise

The edge servers that receive requests for your website from clients are anycast as I mentioned.

The Cloudflare connection to your origin comes out from a data centre from a different IP address; it’s easy to get that as it’s the one making the TCP connection to your server but knowing that IP isn’t of any use as it will likely be different for each connection. That is why it is suggested to allow all these IPs through the firewall to your origin as the request could come from any of them:

https://www.cloudflare.com/en-gb/ips/

What are you trying to achieve?

I believe they’re trying to simulate a proxied connection.

You can try the same IP address that would show up if you proxy a hostname in your zone. You can experiment by making a temporary DNS entry, like proxy-test with your server IP address, then do a DNS lookup on proxy-test.example.com.

2 Likes

I believe they’re trying to simulate a proxied connection.

Thank you. That’s exactly the intent.

I have added a temp hostname in my zone called test – as per advised.

The next step would be to:

  1. Wait a few hours for the changes to propagate
    Note: It’s our understanding that the changes should be immediate because test.petcoach.sg is a new DNS record (not an update to an existing DNS record)
  2. Nslookup test.petcoach.sg

There is one clarification on the above steps:

  1. Since Cloudflare is not yet configured to be my name server, would the DNS resolve be able to resolve test.petcoach.sg?
  2. If unable to resolve, is there a step that I am missing

Note: Cloudflare is not yet used as my DNS nameserver. DNS nameserver is currently provided by another provider. I will only update to use Cloudflare as the DNS nameserver once the sanity checks (testing from local machine) have passed

    1. Nslookup test.petcoach.sg

Please see the nslookup results for the newly added DNS record:

This domain doesn’t use Cloudflare nameservers so DNS isn’t going to resolve with a Cloudflare address

    NS131.SGCLOUDHOSTING.COM
    NS132.SGCLOUDHOSTING.COM
    NS133.SGCLOUDHOSTING.COM
    NS134.SGCLOUDHOSTING.COM

@sdayman’s advice assumed the domain was already using Cloudflare nameservers. Without the zone active on Cloudflare it’s not going to resolve to a Cloudflare edge IP nor is there going to be a valid SSL certificate to serve traffic even if you pointed a domain to Cloudflare’s edge.

2 Likes

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