diff --git a/Bind9-DNS-Server.md b/Bind9-DNS-Server.md index d2494e4..31aa0bd 100644 --- a/Bind9-DNS-Server.md +++ b/Bind9-DNS-Server.md @@ -128,3 +128,22 @@ linuxtechi@bind-server:~$ ### Validating Syntax of bind9 configuration and Zone files If you want to cross verify the syntax of your bind 9 configuration file (named.conf.local). Use the command “named-checkconf“, example is shown below: ``` +linuxtechi@bind-server:~$ sudo named-checkconf /etc/bind/named.conf.local +linuxtechi@bind-server:~$ +``` +If there is no syntax error in your bind configuration file, then it should return to shell without showing any errors. + +To cross verify the syntax your forward and reverse lookup zone files , use the command “named-checkzone“, example is shown below: + +``` +linuxtechi@bind-server:~$ sudo named-checkzone linuxtechi.local /etc/bind/forward.linuxtechi.local +zone linuxtechi.local/IN: loaded serial 6 +OK +linuxtechi@bind-server:~$ +linuxtechi@bind-server:~$ sudo named-checkzone linuxtechi.local /etc/bind/reverse.linuxtechi.local +zone linuxtechi.local/IN: loaded serial 21 +OK +linuxtechi@bind-server:~$ +``` + +[Source](https://www.linuxtechi.com/install-configure-bind-9-dns-server-ubuntu-debian/)