Debian 10 Buster
Sponsored Link

BIND : Set CNAME Record2019/07/16

 
If you'd like to set another name (Alias) to your Host, define CNAME record in zone file.
[1] Set CNAME record in zone file.
root@dlp:~#
vi /etc/bind/srv.world.lan
$TTL 86400
@   IN  SOA     dlp.srv.world. root.srv.world. (
        # update serial
        2019071602  ;Serial
        3600        ;Refresh
        1800        ;Retry
        604800      ;Expire
        86400       ;Minimum TTL
)
        IN  NS      dlp.srv.world.
        IN  A       10.0.0.30
        IN  MX 10   dlp.srv.world.

dlp     IN  A       10.0.0.30
# aliase IN CNAME server's hostname
ftp     IN  CNAME   dlp.srv.world.

root@dlp:~#
rndc reload

server reload successful
root@dlp:~#
dig ftp.srv.world.


; <<>> DiG 9.11.5-P4-5.1-Debian <<>> ftp.srv.world.
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 54525
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: af56834de0be6ce71bf860135d2d5167604e9d7b9107d0d7 (good)
;; QUESTION SECTION:
;ftp.srv.world.                 IN      A

;; ANSWER SECTION:
ftp.srv.world.          86400   IN      CNAME   dlp.srv.world.
dlp.srv.world.          86400   IN      A       10.0.0.30

;; AUTHORITY SECTION:
srv.world.              86400   IN      NS      dlp.srv.world.

;; Query time: 0 msec
;; SERVER: 10.0.0.30#53(10.0.0.30)
;; WHEN: Tue Jul 16 19:24:07 JST 2019
;; MSG SIZE  rcvd: 118
Matched Content