티스토리 뷰

EN/Fedora 18

Fedora 18 DNS Server Set CNAME

식빵TV 2016.04.16 12:12

Fedora 18 DNS Server Set CNAME

If you'd like to set another name to your Host, define CNAME record in zone file.


1. Set CNAME record in zone file.


[root@otaec ~]# vi /var/named/server.world.lan

$TTL 86400

@   IN  SOA     otaec.server.world. root.server.world. (

# update serial

        2013011702  ;Serial

         3600        ;Refresh

        1800        ;Retry

        604800      ;Expire

        86400       ;Minimum TTL

)

        IN  NS      otaec.server.world.

        IN  A       10.0.0.30

        IN  MX 10   otaec.server.world.


otaec     IN  A       10.0.0.30

# [ aliase IN CNAME server's name ]

 ftp     IN  CNAME   otaec.server.world.



[root@otaec ~]# systemctl restart named.service 


[root@otaec ~]# dig ftp.server.world.

; <<>> DiG 9.9.2-P1-RedHat-9.9.2-6.P1.fc18 <<>> ftp.server.world.

;; global options: +cmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 12657

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 1, ADDITIONAL: 1


;; OPT PSEUDOSECTION:

; EDNS: version: 0, flags:; udp: 4096

;; QUESTION SECTION:

;ftp.server.world.              IN      A


;; ANSWER SECTION:

ftp.server.world.       86400   IN      CNAME   otaec.server.world.

otaec.server.world.       86400   IN      A       10.0.0.30


;; AUTHORITY SECTION:

server.world.           86400   IN      NS      otaec.server.world.


;; Query time: 1 msec

;; SERVER: 10.0.0.30#53(10.0.0.30)

;; WHEN: Thu Jan 17 13:06:38 2013

;; MSG SIZE  rcvd: 93

댓글