Azure traffic manager behind Cloudflare CDN - azure

As we use Cloudflare, I'm trying to setup Azure Traffic manager to redirect traffic for specific regions based on the user location.
As for Configurations on Cloudflare and Azure traffic manager, I have:
Cloudflare DNS Records
Type
Name
Content
A
service-eu.domain.com
EU firewall IP
A
service-us.domain.com
US firewall IP
CNAME
service.domain.com
redacted.trafficmanager.net
Traffic manager Configurations:
pretty standard, nothing was changed
Endpoint setup:
EU endpoint:
US endpoint:
So far, everything seems to be in place with the guides that I'm following, but when i try to hit service.domain.com, cloudflare returns:
r/CloudFlare - Cloudflare and Azure Traffic manager, how to get it working?
This would be what we have i'm planning to achieve:
Similar issue that i found, but solution doesn't work for my scenario, so i believe this question cant be considered as duplicate.
Azure Traffic Manager with Cloudflare CDN
Any help would be deeply appreciated since I'm currently out of ideas on how to put those two guys together.

Related

extending Cloudflare hosted security to the not-cloudflare resources

Halo, i’m a dev recently diving into cloudflare security layers and got few questions on a website security which is deployed to cloudflare. I’m using Pages and my domain is directly hosted by cloudflare Registrar. I’m also using the security layers provided with cloudflare infrastructure, including [ Bots, DDos, Settings, Page Shield ], which can be found in security tab of my domain in cloudflare dashboard. Below list is my questions:
security layers in use: [ Bots, DDos, Settings, Page Shield ]
I’m using firebase hosting to link my firebase functions with the domain which is hosted by cloudflare. In this case, do the above listed security layers of cloudflare automatically protect the firebase hosting resources or traffics?
I’m using cloudflare workers to manage Durable Objects. The Workers’ functions are also linked to the same root domain with different subdomain. In this case, do the above listed security layers of cloudflare automatically protect the Worker traffics?
the proxy status of firebase hosting connection is “DNS only” mode(not “Proxied” mode), since in the case of Proxied, the dns connection does not work(i didn't figure out the reason yet..). In this case, it makes me feel like the firebase hosting resources are not being protected since the orange switch in DNS dash is turned off
please consider the cloudflare plan is Pro
Thank you in advance [:
For the products you are listing, Cloudflare is implemented as a reverse proxy.
This means that from an end user perspective, when they try to connect to your services, their traffic reaches Cloudflare first (since a proxied record resolves to a Cloudflare anycast IP). Cloudflare carries out the features and security services that are configured, then forwards the HTTP requests to your origin infrastructure as specified in your Cloudflare DNS tab. This is true when the traffic is directed to proxied records.
For records in DNS-only mode, Cloudflare only performs DNS resolution (answering to the DNS query for that DNS record). Once this is done, the client will connect directly to the specified resource and the traffic will not be flowing through the Cloudflare network, meaning Cloudflare cannot provide proxy services in this scenario.
For a full explanation, I recommend the following documentation page

How to route root domain A record to a traffic manager with traffic manager endpoints

I currently have 3 traffic managers, 1 entry point for our domain, which does geolocation routing to 2 other traffic managers. One global, one for the US.
These traffic managers are priority traffic managers which point to application gateways. By having the priority traffic managers, it allow us to have a 'failover' if one site / application gateway goes down.
The reason we have a application gateway in the different countries is to allow path manipulation so if the user is from the US, they get a /us path instead of a /.
I have configured our CNAMES like www. and blog. in the application gateways for both, global and US which works fine. I can point the CNAME records to the entry traffic manager no problem.
The problem I have having is pointing the A record root domain to the traffic manager. Since traffic managers don't have IP addresses, I get an error because in Azure, the root domain can be pointed at a traffic manager, but only one that uses external endpoints using a IP Address.
Has anyone else ran into this issue and have a way to solve it?
Thanks
Adding a root/apex domain to Azure Traffic Manager should be possible as it is integrated with Azure DNS. So, you should be able to create A record to ATM as shown below from Azure DNS,

How to redirect traffic hosted on an azure endpoint (DNS/static IP) to different external IP address

Question: How do I host an endpoint in azure which allows me to redirect internet traffic at will between azure and aws services?
I am hosting two kubernetes clusters - one in Azure and the other in AWS. I want to be able to:
1. redirect the traffic at will to either aws or azure, whilst retaining the public dns endpoint.
2. fail over manually [and pref automatically too] to the aws cluster. What is the best way to host the endpoint in azure?
Requirements:
The traffic needs to be redirected immediately - no caching issues and stale loads!
Ability to configure failover - i.e. specify that Azure is hot and AWS is the failover service - the traffic should be automatically redirected as soon as Azure goes down.
I have looked at Traffic Manager, Load Balancers and Application Gateway. Not sure which one (if any) of these is best.
traffic manager wont work for you, since its a dns service, so caching will happen (admittedly its the best solution if you set dns cache to 5 seconds or something). application gateway allows you to specify an ip address as an endpoint, load balancers only work when attached to vms inside azure. But application gateways dont allow to failover at will. you would need to block the probe to failover.
Azure Front Door might be the solution for you (like the other answer mentions)
You can have a look into Azure Front Door Service for your usecase.
Look into this https://learn.microsoft.com/en-gb/azure/frontdoor/front-door-overview

traffic manager for https azure website

I read quite a lot documents and other questions on stackoverflow about this, and I have to admit that it just makes me much more confused.
I have a site that hosted both in EU west and EU north azure. Say their urls are:
exampleeuw.azurewebsites.net
exampleeun.azurewebsites.net
Then I bought a ssl certificate for www.example.com.
On both sites, I added www.example.com to custom domain.
On both sites, I uploaded the certificate.
Then created the traffic manager site and its dns name is "example.trafficmanager.net", I have both web app added as end point.
But should I access https://www.example.com or https://example.trafficmanager.net?
If I access https://www.example.com, how can that traffic go to the traffic manager first?
Also when I created Traffic Manager profile, I have to select a Resource group location (north Europe for example), if North Europe azure is down, will it impact the access?
Really hope that I can find some step by step examples on how Microsoft wants us to use this, as it has been a quite frustrating learning process.
Requests should go to the traffic manager. It will be the one redirecting to both of your App Services no matter where they are.
Prior configuring your Traffic Manager and DNS, make sure both of your web application are working and configured with custom domains and SSL certificates.
Then, in your DNS, point your www.example.com website to the traffic manager as shown here:
https://azure.microsoft.com/en-us/documentation/articles/traffic-manager-point-internet-domain/
That's all you have to do.

traffic manager + azure website : how do I configure custom dns ssl

I have a custom dns entry mapped to my traffic manager setup via CNAME record. I also have traffic manager pointing to my azure website endpoint and I have a wildcard cert matching my custom dns uploaded on my website. I'm having trouble getting ssl to work. The documentation is not clear on how to set up SSL when using traffic manager. Any help is appreciated. Please note I had this working with cloud service "web role" but I'm wanting to migrate to azure websites.
Have you seen this blog post by Scott Hanselman? http://www.hanselman.com/blog/CloudPowerHowToScaleAzureWebsitesGloballyWithTrafficManager.aspx
You don't upload the certificate to traffic manager. You upload it and set it up for each of the individual sites that the traffic manager will route your customers to

Resources