Subscribe Us


Breaking

Recent In Voip

Popular

Comments

Recent

Migration of ROUTE 53 to Azure DNS.

 

To migrate DNS record from aws to azure we can use cli53 (third party tool) and azure CLI. 


DNS zone file and zone transfer - ClouDNS Blog
Process to install cli53 and export report sets. 
Download cli53 from git hub. 
LINUX. 
Configure IAM in access using aws configure.  
cd /tmp 
wget https://github.com/barnybug/cli53/releases/download/0.8.16/cli53-linux-amd64. 
sudo mv cli53-my-platform /usr/local/bin/cli53 
sudo chmod +x /usr/local/bin/cli53 

vi  ~/.aws/credentials 
[default] 
aws_access_key_id = AKID1234567890 
aws_secret_access_key = MY-SECRET-KEY 
  
:wq 
Export as a BIND zone file (for backup!): 
$ cli53 export example.com > <backup zone file name> 


Now we can import this backup of domain using azure cli. 

az network dns zone import -g <resource group> -n <zone name> -f <backup zone file name> 

AWS Operational: Below are the reference command using more feature of cli53. 

Create a hosted zone: 
$ cli53 create example.com --comment 'my first zone' 
Check what we've done: 
$ cli53 list 
List also supports other output formats (eg. json for scripting using jq): 
$ cli53 list -format json | jq .[].Name 
Import a BIND zone file: 
$ cli53 import --file zonefile.txt example.com 
Replace with an imported zone, waiting for completion: 
$ cli53 import --file zonefile.txt --replace --wait example.com 
Also, you can 'dry-run' import, to check what will happen: 
$ cli53 import --file zonefile.txt --replace --wait --dry-run example.com 
Create an A record pointed to 192.168.0.1 with TTL of 60 seconds: 
$ cli53 rrcreate example.com 'www 60 A 192.168.0.1' 
Update this A record to point to 192.168.0.2: 
$ cli53 rrcreate --replace example.com 'www 60 A 192.168.0.2' 
Delete the A record: 
$ cli53 rrdelete example.com www A 
Create an MX record: 
$ cli53 rrcreate example.com '@ MX 10 mail1.' '@ MX 20 mail2.' 
Create a round robin A record: 
$ cli53 rrcreate example.com '@ A 127.0.0.1' '@ A 127.0.0.2' 
For CNAME records, relative domains have no trailing dot, but absolute domains should: 
$ cli53 rrcreate example.com 'login CNAME www' 
$ cli53 rrcreate example.com 'mail CNAME ghs.googlehosted.com.' 
Export as a BIND zone file (for backup!): 
$ cli53 export example.com 
Export fully-qualified domain names (instead of just prefixes) to stdout, and send AWS debug logging to stderr: 
$ cli53 export --full --debug example.com > example.com.txt 2> example.com.err.log 
Create some weighted records: 
$ cli53 rrcreate --identifier server1 --weight 10 example.com 'www A 192.168.0.1' 
$ cli53 rrcreate --identifier server2 --weight 20 example.com 'www A 192.168.0.2' 
Create an alias to an ELB: 
$ cli53 rrcreate example.com 'www AWS ALIAS A dns-name.elb.amazonaws.com. ABCDEFABCDE false' 
Create an alias to an A record: 
$ cli53 rrcreate example.com 'www AWS ALIAS A server1 $self false' 
Create an alias to a CNAME: 
$ cli53 rrcreate example.com 'docs AWS ALIAS CNAME mail $self false' 
Create some geolocation records: 
$ cli53 rrcreate -i Africa --continent-code AF example.com 'geo 300 IN A 127.0.0.1' 
$ cli53 rrcreate -i California --country-code US --subdivision-code CA example.com 'geo 300 IN A 127.0.0.2' 
Create a primary/secondary pair of health checked records: 
$ cli53 rrcreate -i Primary --failover PRIMARY --health-check 2e668584-4352-4890-8ffe-6d3644702a1b example.com 'ha 300 IN A 127.0.0.1' 
$ cli53 rrcreate -i Secondary --failover SECONDARY example.com 'ha 300 IN A 127.0.0.2' 
Create a multivalue record with health checks: 
$ cli53 rrcreate -i One --multivalue --health-check 2e668584-4352-4890-8ffe-6d3644702a1b example.com 'ha 300 IN A 127.0.0.1' 
$ cli53 rrcreate -i Two --multivalue --health-check 7c90445d-ad67-47bd-9649-3ca0985e1f88 example.com 'ha 300 IN A 127.0.0.2' 
Create, list and then delete a reusable delegation set: 
$ cli53 dscreate 
$ cli53 dslist 
$ cli53 dsdelete NA24DEGBDGB32 

0 on: "Migration of ROUTE 53 to Azure DNS."