<\/span><\/h2>\n\n\n\nBy default, the BIND9 server on CentOS\/RHEL offers recursive functionality exclusively for the localhost. External requests will be rejected. Modify the main configuration file of BIND, located at \/etc\/named.conf.<\/p>\n\n\n\n
# nano \/etc\/named.conf<\/pre>\n\n\n\nFind these two lines<\/p>\n\n\n\n
listen-on port 53 { 127.0.0.1; };\n listen-on-v6 port 53 { ::1; };<\/code><\/pre>\n\n\n\nThen, comment on them, and it should look like these<\/p>\n\n\n\n
#listen-on port 53 { 127.0.0.1; };\n#listen-on-v6 port 53 { ::1; };<\/pre>\n\n\n\nYou can also modify this line<\/p>\n\n\n\n
allow-query { localhost; };<\/pre>\n\n\n\nTo something like this<\/p>\n\n\n\n
allow-query { localhost; 192.168.0.0\/24; 10.10.10.0\/24; };<\/pre>\n\n\n\nOr, if you want to make some tests before allowing specific IP ranges, simply comment on the lines; it should be like this:<\/p>\n\n\n\n
#allow-query { localhost; };<\/pre>\n\n\n\nSave the file, then exit and restart Bind.<\/p>\n\n\n\n
# systemctl restart named<\/pre>\n\n\n\nNow, the Bind service is listening to your server’s interfaces, not only localhost.<\/p>\n\n\n\n