howto export dns for cloudflare

How do I export all my Linode DNS records in BIND format for importing into CloudFlare? (I have several shortcuts to Google services.)

9 Replies

@ingber:

How do I export all my Linode DNS records in BIND format for importing into CloudFlare? (I have several shortcuts to Google services.)

Go to the Linode DNS manager at https://manager.linode.com/dns and click the "Zone File" button, you should be able to copy the zone file and paste it into the matching form in CloudFlare. Once it's done, you can start to switch your nameserver records over with your DNS registrar, as appropriate.

I noticed that the page brought up under the Zone File tab had quotes ("") around the TXT fields. CF already had one of my 3 TXT fields entered without quotes (as they appear on my dns page), so I did not use any quotes on the other 2. Is that OK?

Thanks for the info.

@ingber:

I noticed that the page brought up under the Zone File tab had quotes ("") around the TXT fields. CF already had one of my 3 TXT fields entered without quotes (as they appear on my dns page), so I did not use any quotes on the other 2. Is that OK?

Thanks for the info.

You'll probably find that Cloudflare adds the quotes. Use dig to query the Cloudflare nameserver directly to see.

Something like

dig @XXX.ns.cloudflare.com mydomain.com TXT

Where XXX is one of your assigned Cloudflare nameservers.

Strictly speaking, the quotes are required in the zonefile (and CloudFlare should import from a zone file properly), but record-level UI editors often take care of quoting for you. I'm about 85% sure that CloudFlare does import the zone properly if you copy/paste the entire zone file, but it's been a few months since I helped a client move to CloudFlare.

It seems you just have to delete the Linode NS entries from the Zone File before importing into CloudFlare, as these are given by CF.

My recollection is that CloudFlare does (or did do) that automatically. Maybe it changed?

Hi. No, I first did the simple import and had to delete those Linode NS records by hand. I then read that these are ignored anyway, so I just imported the full Zone File (without the header).

Right… The "Are ignore anyway" part means you didn't have to delete anything by hand -- Or am I misreading?

(I'm not just being pedantic: There was no reason to do it when I generated documentation for my clients in the past, if that has changed, I want to update my documentation)

Yes, that is correct. "Ignore" means nothing has to be deleted from the Zone File to import into CF.

I have noted that some IPs still get through CF. I have seen some similar posts on other boards.

(1)

the request goes to

http~~://MyIPaddress/…

instead of to

http~~://MyDomainName/…

(2)

the request goes with a

"GET http"

(not "GET / HTTP")

I do not see anyway of addressing these concerns in any tabs in my CF Dashboard.

To address (1), I have put into my .httaccess

RewriteEngine On

RewriteBase /

RewriteCond %{HTTP_HOST} ^MyIPAaddress

RewriteRule ^(.*)$ http://MyDomainName/$1 [L,R=301]

To address (2), I have added a filter to my fail2ban jail.local

[Definition]

failregex = ^ .*GET http

ignoreregex =

There still are some leaks/strays into my access.log and ssl_access.log.

Thanks.~~~~

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct