BIND : Set CNAME2018/05/08 |
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@dlp:~#
vi /etc/bind/srv.world.lan $TTL 86400 @ IN SOA dlp.srv.world. root.srv.world. ( # update serial 2018050802 ;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 name ftp IN CNAME dlp.srv.world.
root@dlp:~#
root@dlp:~# rndc reload server reload successful dig ftp.srv.world. ; <<>> DiG 9.11.3-1ubuntu1-Ubuntu <<>> ftp.srv.world. ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15143 ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 65494 ;; QUESTION SECTION: ;ftp.srv.world. IN A ;; ANSWER SECTION: ftp.srv.world. 86400 IN CNAME dlp.srv.world. dlp.srv.world. 7199 IN A 10.0.0.30 ;; Query time: 0 msec ;; SERVER: 127.0.0.53#53(127.0.0.53) ;; WHEN: Tue May 08 17:25:38 JST 2018 ;; MSG SIZE rcvd: 76 |
Sponsored Link |