Showing posts with label Bind. Show all posts
Showing posts with label Bind. Show all posts

Checking the configuration of named.conf and zone files

0 comments
Checking the configuration of named.conf and zone files

The bind package has utilities to check the syntax of named.conf and any zone files. We can make use of those binaries to check our modifications done to those files before reloading or restarting named service.

To check the sytax of zone file /var/named/serverbuddies.com.db

[root@bash ~]# named-checkzone kb.com /var/named/serverbuddies.com.db

zone serverbuddies.com.db/IN: loaded serial 2006032401

OK

If everything is correct, it will show the serial number with which the zone file is loaded. Otherwise, it will give error message indicating the line number at which the error occured.

To check the syntax of named.conf file,

[root@bash ~]# named-checkconf /etc/named.conf

You may also load the configuration of all master zones listed in named.conf at the time of checking the syntax as,

[root@bash ~]# named-checkconf -z /etc/named.conf

The command will show a detailed output in case any error in named.conf file.

This way we can make sure that we are not editing the configuration file wrongly.

Checking the configuration of named.conf and zone files

The bind package has utilities to check the syntax of named.conf and any zone files. We can make use of those binaries to check our modifications done to those files before reloading or restarting named service.

To check the sytax of zone file /var/named/serverbuddies.com.db

[root@bash ~]# named-checkzone kb.com #/var/named/serverbuddies.com.db

zone serverbuddies.com.db/IN: loaded serial 2006032401

OK

If everything is correct, it will show the serial number with which the zone file is loaded. Otherwise, it will give error message indicating the line number at which the error occured.

To check the syntax of named.conf file,

[root@bash ~]# named-checkconf /etc/named.conf

You may also load the configuration of all master zones listed in named.conf at the time of checking the syntax as,

[root@bash ~]# named-checkconf -z /etc/named.conf

The command will show a detailed output in case any error in named.conf file.

This way we can make sure that we are not editing the configuration file wrongly.

g?^g????_?????~g????-?¢?_g????~????_g????? ????PuShKaR

?»??_?????^?????_?????~??V?_????? - ?Ú?????«?

Checking the configuration of named.conf and zone files

0 comments
Checking the configuration of named.conf and zone files

The bind package has utilities to check the syntax of named.conf and any zone files. We can make use of those binaries to check our modifications done to those files before reloading or restarting named service.

To check the sytax of zone file /var/named/serverbuddies.com.db

[root@bash ~]# named-checkzone kb.com /var/named/serverbuddies.com.db

zone serverbuddies.com.db/IN: loaded serial 2006032401

OK

If everything is correct, it will show the serial number with which the zone file is loaded. Otherwise, it will give error message indicating the line number at which the error occured.

To check the syntax of named.conf file,

[root@bash ~]# named-checkconf /etc/named.conf

You may also load the configuration of all master zones listed in named.conf at the time of checking the syntax as,

[root@bash ~]# named-checkconf -z /etc/named.conf

The command will show a detailed output in case any error in named.conf file.

This way we can make sure that we are not editing the configuration file wrongly.

Checking the configuration of named.conf and zone files

The bind package has utilities to check the syntax of named.conf and any zone files. We can make use of those binaries to check our modifications done to those files before reloading or restarting named service.

To check the sytax of zone file /var/named/serverbuddies.com.db

[root@bash ~]# named-checkzone kb.com #/var/named/serverbuddies.com.db

zone serverbuddies.com.db/IN: loaded serial 2006032401

OK

If everything is correct, it will show the serial number with which the zone file is loaded. Otherwise, it will give error message indicating the line number at which the error occured.

To check the syntax of named.conf file,

[root@bash ~]# named-checkconf /etc/named.conf

You may also load the configuration of all master zones listed in named.conf at the time of checking the syntax as,

[root@bash ~]# named-checkconf -z /etc/named.conf

The command will show a detailed output in case any error in named.conf file.

This way we can make sure that we are not editing the configuration file wrongly.

g?^g????_?????~g????-?¢?_g????~????_g????? ????PuShKaR

?»??_?????^?????_?????~??V?_????? - ?Ú?????«?

Error: Named rndc.key while starting

0 comments
When trying to restart named process after making modifications may end up in a corrupt rndc.key key and the error will show like this:

Sep 12 03:30:54 server named[23683]: /etc/rndc.key:1: configuring key ‘rndc-key’: bad base64 encoding
Sep 12 03:30:54 server named[23683]: loading configuration: bad base64 encoding
Sep 12 03:30:54 server named[23683]: exiting (due to fatal error)


A simple explanation to this is that the key got modified somehow might me some bug.
What to do about this? Well it is simple just check the /etc/rndc.conf file and copy the key from there(you will see the key in the first lines of the file) and replace the key that it is in /etc/rndc.key file and restart named process.

# service named restart



Stopping named: [ OK ]
Starting named: [ OK ]

Go_GrEen^ThiNk_GReeN~LoVE_GreEn - Pushkar

Error: Named rndc.key while starting

0 comments
When trying to restart named process after making modifications may end up in a corrupt rndc.key key and the error will show like this:

Sep 12 03:30:54 server named[23683]: /etc/rndc.key:1: configuring key ‘rndc-key’: bad base64 encoding
Sep 12 03:30:54 server named[23683]: loading configuration: bad base64 encoding
Sep 12 03:30:54 server named[23683]: exiting (due to fatal error)


A simple explanation to this is that the key got modified somehow might me some bug.
What to do about this? Well it is simple just check the /etc/rndc.conf file and copy the key from there(you will see the key in the first lines of the file) and replace the key that it is in /etc/rndc.key file and restart named process.

# service named restart



Stopping named: [ OK ]
Starting named: [ OK ]

Go_GrEen^ThiNk_GReeN~LoVE_GreEn - Pushkar

How to Hide BIND version

0 comments

BIND (Berkeley Internet Name Domain) is the most commonly used DNS server on the Internet, especially on Unix-like systems.






Login as root to your sever.



Edit named.conf configuration:
# nano /etc/named.conf

If you find a options function add this line to it:
version “some version”;

If that function does not exist, just add it:
options {version “some version”;};

Save and Exit

Restart your BIND service to take the change.
# /etc/init.d/named restart