3.5. 测试 DNSaaS 与 BIND9 的集成
1.为您的服务器创建一个条目:
designate server-create --name $(hostname).
# designate server-create --name $(hostname).
2.验证您的 DNS 服务器记录之前是否已创建:
designate server-list
# designate server-list
3.创建一个域(不要忘记 . 在- name 选项 的末尾)
designate domain-list
designate domain-create --name example.com. --email root@example.com
# DOMAINID=$(designate domain-list | grep example.com | awk '{print $2}')
# designate domain-list
# designate domain-create --name example.com. --email root@example.com
# DOMAINID=$(designate domain-list | grep example.com | awk '{print $2}')
注意
从 BIND 指定创建域时,它基本上运行熟悉这个命令的命令:
rndc -s 192.168.122.41 -p 953 -c /etc/rndc.conf -k /etc/rndc.key addzone example.com '{ type slave; masters { 192.168.122.41 port 5354; }; file "slave.example.com.ff532e15-55a9-4966-8f1e-b3eddb2891ba"; };'
# rndc -s 192.168.122.41 -p 953 -c /etc/rndc.conf -k /etc/rndc.key addzone example.com '{ type slave; masters { 192.168.122.41 port 5354; }; file "slave.example.com.ff532e15-55a9-4966-8f1e-b3eddb2891ba"; };'
4.创建记录和测试查找(不要忘记 . 在- name 选项的末尾)
designate record-create --name server1.example.com. --type A --data 1.2.3.4 $DOMAINID dig +short -p 53 @192.168.100.20 server1.example.com A
# designate record-create --name server1.example.com. --type A --data 1.2.3.4 $DOMAINID
# dig +short -p 53 @192.168.100.20 server1.example.com A