1.4 KiB
1.4 KiB
CF2PDNS
Converts a Cloudflare DNS zone export (BIND format) into CSV for Poweradmin's Bulk add records form.
Usage
python3 cf2pa.py <export.txt> [more exports...]
The CSV is written to stdout and warnings go to stderr. Paste the output into Zone → Bulk add records in Poweradmin.
Output format: name,type,content,prio,ttl
What it does
- Skips
SOAandNSrecords (these come from your Poweradmin zone template) - Strips Cloudflare
cf_tagscomments and trailing dots - Converts TTL
1(Cloudflare "Auto") to3600 - Moves the MX/SRV priority into the
priocolumn - Escapes TXT quotes for CSV (
"..."→"""..."""), keeping multi-string TXT (e.g. DKIM) intact
Warnings (records not converted)
- Apex CNAME: Cloudflare flattens it, but standard DNS doesn't allow it. Add an
A/AAAArecord manually. - PTR records named
*.arpa.<zone>: these have no effect inside a forward zone. Set reverse DNS with your IP provider.
Migration checklist
- Disable DNSSEC at Cloudflare first and wait at least a day for the DS record's TTL to expire.
- Create the zone in Poweradmin as Master using the NS template.
- Bulk-import the CSV and verify that the secondary has the zone:
dig +short SOA <zone> @<ns2> - Change the nameservers at the registrar.
- Delete the Cloudflare zone a day later.
License
0BSD: do whatever you want with it. If it breaks your DNS, you get to keep both pieces.