Solution: ** server can't find cm1.p2pvpn.com: servfail
1. Positioning
Use named-checkzone check
Named-checkzone p2pvpn.com/etc/bind/db.p2pvpn.com
/Etc/bind/db.p2pvpn.com: 5: SOA record not at top of zone (p2pvpn.com.p2pvpn.com)
Zone p2pvpn.com/in: loading from master file/etc/bind/db.p2pvpn.com failed: Not at top of Zone
Named-checkzone 7.0.172.in-ADDR. Arpa/etc/bind/db.7.0.172
/Etc/bind/db.7.0.172: 5: SOA record not at top of zone (7.0.172.in-ADDR. arpa.7.0.172.in-ADDR. ARPA)
Zone 7.0.172.in-ADDR. Arpa/In: loading from master file/etc/bind/db.7.0.172 failed: Not at top of Zone
2. Modify
Remove the two $ origin definitions in the file. The format of $ origin is incorrectly defined.
; P2pvpn.com
;
$ Origin p2pvpn.com
$ TTL 604800
@ In SOA dns.p2pvpn.com. root.p2pvpn.com .(
1;
604800;
86400;
2419200;
604800 );
@ In NS DNS
DNS in a 172.0.7.206
Cm1 in a 172.0.7.205
Change to->
$ TTL 604800
@ In SOA dns.p2pvpn.com. root.p2pvpn.com .(
1;
604800;
86400;
2419200;
604800 );
@ In NS DNS
DNS in a 172.0.7.206
Cm1 in a 172.0.7.205
3. Check
Named-checkzone p2pvpn.com/etc/bind/db.p2pvpn.com
Zone p2pvpn.com/in: loaded Serial 1
OK
Named-checkzone 7.0.172.in-ADDR. Arpa/etc/bind/db.7.0.172
Zone 7.0.172.in-ADDR. Arpa/In: NS 'dns. 7.0.172.in-ADDR. arma' has no address records (A or AAAA)
Zone 7.0.172.in-ADDR. Arpa/In: loaded Serial 1
OK
4. NSLookup Test
Gaoyibo @ gaoyibo-desktop :~ $ Sudo/etc/init. d/bind9 restart
* Stopping Domain Name Service... bind9 [OK]
* Starting Domain Name Service... bind9 [OK]
Gaoyibo @ gaoyibo-desktop :~ $ NSLookup
> Dns.p2pvpn.com
Server: 172.0.7.206
Address: 172.0.7.206 #53
Name: dns.p2pvpn.com
Address: 172.0.7.206