DNSã®ç§»è¡ã®ç¢ºèªã«ã¤ãã¦
æ¦è¦
ãã¨ãã¨XXX.XXX.XXX.XXXã¨ããIPã§
DNSã管çãã¦ããã®ã§ãã
ä»å¾ã¯ã¯ã©ã¦ãç°å¢ã®YYY.YYY.YYY.YYY
ã®DNSãµã¼ãã¼ã«å¼ã£è¶ãäºã«ãªãã¾ãã
ã¾ã¼ã³ãã¡ã¤ã«ã®å
容ã¯å¤ããªãã®ã§
ãã®ã¾ã¾ã³ããã§çµäºãªã®ã§ãã
YYY.YYY.YYY.YYYã®ãµã¼ãã¼ã«æ¬å½ã«åæ ããã¦ããã®ã
確èªãã
ä¾
ã移è¡ãã¡ã¤ã³ï¼masalib.net
ã移è¡åDNSï¼XXX.XXX.XXX.XXX
ã移è¡å¾DNSï¼YYY.YYY.YYY.YYY
å 容ã®ç¢ºèªæé
digã³ãã³ãã§ç¢ºèªãã
dig a +norec @XXX.XXX.XXX.XXX masalib.net ; <<>> DiG <<>> a @XXX.XXX.XXX.XXX masalib.net ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57650 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;masalib.net. IN A ;; AUTHORITY SECTION: masalib.net. 873 IN SOA ns-1692.awsdns-19.co.uk. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400 ;; Query time: 1 msec ;; SERVER: XXX.XXX.XXX.XXX#53(XXX.XXX.XXX.XXX) ;; WHEN: Fri Aug dd hh:mm:ss 2015 ;; MSG SIZE rcvd: 116
è£è¶³
aã¯Aã¬ã³ã¼ããåå¾ããã¨ãããã®ã§ã
â+norecâã¯åèµ·ååããããªã
ï¼ã¾ã¼ã³ãã¡ã¤ã«ããããªãããªãã§ãã¨ããçºï¼
â+nottlidâã§TTLãé表示ã«ãããã¨ãã§ãã
digã³ãã³ãã®ã³ã¡ã³ããåé¤ããæé
â;âã§å§ã¾ãã®ã¯å®éã«ã¯ä½¿ã£ã¦ããªãæ
å ±ã§ã
â;âã§å§ã¾ãé¨åã¯é¤å¤ããããã°ã©ã ãç¨æãã
sanitize.pl
use strict; use warnings; use utf8; while (my $line = <stdin>){ chomp($line); if ($line =~/^\;/m ){ # print "åºåããªã"; }elsif ($line eq "" ){ # print "åºåããªã"; }else{ print "$line\r\n"; } }
digã³ãã³ãã®æ¨æºåºåããçµæã«å¯¾ãã¦å®è¡ãã
dig a +norec @XXX.XXX.XXX.XXX masalib.net | perl sanitize.pl masalib.net. 900 IN SOA ns-1692.awsdns-19.co.uk. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400
ãã£ãããã¾ãã
å 容ã®ç¢ºèªæé
ããã§æ¯è¼ãããããªã£ãã®ã§
移è¡åã¨ç§»è¡å¾ãããã¹ã¾ã
dig a +norec @XXX.XXX.XXX.XXX masalib.net | perl sanitize.pl >> before.txt dig a +norec @yyy.yyy.yyy.yyy masalib.net | perl sanitize.pl >> after.txt diff before.txt after.txt
2015/09/01追è¨
diffããçµæã¯
ã»nsã¬ã³ã¼ãã«å·®åããã
ã»å¤æ´ããããã«TTLãçããã¦ããã®ã§ãã®å·®åããã
ã»serialâã¯å¿
ãå·®åãçºçãã
ã¡ãªã¿ã«ç§»è¡åã ã¨çµæãã¡ããã®ã§
ããã§ã確èªã§ãããã
# dig a +norec @XXX.XXX.XXX.XXX masalib.net | perl sanitize.pl masalib.net. 5 IN A 54.231.224.67 masalib.net. 172800 IN NS ns-1339.awsdns-39.org. masalib.net. 172800 IN NS ns-1615.awsdns-09.co.uk. masalib.net. 172800 IN NS ns-395.awsdns-49.com. masalib.net. 172800 IN NS ns-735.awsdns-27.net. # dig a +norec @yyy.yyy.yyy.yyy masalib.net | perl sanitize.pl com. 171417 IN NS k.gtld-servers.net. com. 171417 IN NS l.gtld-servers.net. com. 171417 IN NS m.gtld-servers.net. com. 171417 IN NS a.gtld-servers.net. com. 171417 IN NS b.gtld-servers.net. com. 171417 IN NS c.gtld-servers.net. com. 171417 IN NS d.gtld-servers.net. com. 171417 IN NS e.gtld-servers.net. com. 171417 IN NS f.gtld-servers.net. com. 171417 IN NS g.gtld-servers.net. com. 171417 IN NS h.gtld-servers.net. com. 171417 IN NS i.gtld-servers.net. com. 171417 IN NS j.gtld-servers.net.
å®éã«æé ã«è½ã¨ãã¦ã¿ãã¨
digã³ãã³ãã®ç¥ããªããã¨ãããã£ã¦ããã£ã
SOAã®ã¬ã³ã¼ãã¯+multilneã®ãªãã·ã§ã³ãä»ããã»ããããããããã£ã
ï¼åºåããçµæãï¼è¡ã§ã¯ãªãã¦ãã¨ããªæã§æ¹è¡ãã¦ãããæ©è½ï¼
ãªãã®å ´å
dig soa +norec +nottlid @ns-1339.awsdns-39.org masalib.net | perl sanitize.pl masalib.net. IN SOA ns-1339.awsdns-39.org. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400 masalib.net. IN NS ns-1339.awsdns-39.org. masalib.net. IN NS ns-1615.awsdns-09.co.uk. masalib.net. IN NS ns-395.awsdns-49.com. masalib.net. IN NS ns-735.awsdns-27.net.
ããã®å ´å
dig soa +norec +nottlid +multiline @ns-1339.awsdns-39.org masalib.net | perl sanitize.pl masalib.net. IN SOA ns-1339.awsdns-39.org. awsdns-hostmaster.amazon.com. ( 1 ; serial 7200 ; refresh (2 hours) 900 ; retry (15 minutes) 1209600 ; expire (2 weeks) 86400 ; minimum (1 day) ) masalib.net. IN NS ns-1339.awsdns-39.org. masalib.net. IN NS ns-1615.awsdns-09.co.uk. masalib.net. IN NS ns-395.awsdns-49.com. masalib.net. IN NS ns-735.awsdns-27.net.
ææ¥ã¯ãä¼ã¿ãªã®ã§
ã¯ãã¼ã©ã¼ã®ä½æã®ç¶ãããããªãããã§ã