{"id":4155,"date":"2019-09-24T23:26:08","date_gmt":"2019-09-24T20:26:08","guid":{"rendered":"https:\/\/kifarunix.com\/?p=4155"},"modified":"2024-03-12T21:51:07","modified_gmt":"2024-03-12T18:51:07","slug":"setup-bind-dns-using-webmin-on-debian-10","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/setup-bind-dns-using-webmin-on-debian-10\/","title":{"rendered":"Setup Bind DNS Using Webmin on Debian 10"},"content":{"rendered":"\n
Welcome to our tutorial on how to install and setup Bind DNS using Webmin on Debian 10. Webmin<\/a> is a web-based control panel that allows system administrators to administer system administration tasks from web user interface. This guide assumes that you have already installed Webmin on your Debian 10 server. If not, you can follow the link below.<\/p>\n\n\n\n Or, you can work with a Philadelphia it company<\/a> to take care of the setup process for you.<\/p>\n\n\n\n Install Webmin on Debian 10<\/a><\/p>\n\n\n\n Once you have installed and configured Webmin on your Debian 10 Buster, proceed to install and setup Bind DNS using Webmin on your Debian 10 server.<\/p>\n\n\n\n Since we are going to run system update as well as other system administrative tasks such as package installation via Webmin, login as a root user or a user with sudo rights.<\/p>\n\n\n Launch the terminal by pressing Alt+k<\/strong>. Next, run system package update command.<\/p>\n\n\n\n Next, you need to install Bind DNS server module. This can be done from the Webmin interface. Hence, on the dashboard, navigate to Un-used Modules <\/strong>> BIND DNS Server<\/strong> and click “Click here<\/strong>” to build Bind package and required dependencies for installation.<\/p>\n\n\n\n Click Install Now<\/strong> to install the Bind packages and all required dependencies.<\/p>\n\n\n\n Once the installation is complete, click Return to BIND DNS Server<\/strong> below the screen to go back to BIND DNS Server configuration interface.<\/p>\n\n\n\n To begin with, create an access control list for your DNS server to specify the IP addresses or networks to deny or allow to query the DNS server.<\/p>\n\n\n\n To create the ACL, Click Access Control Lists<\/strong> and set the name of the ACL and the IP addresses or the networks.<\/p>\n\n\n\n For example, we created an ACL called Next, you need to configure BIND global configuration options. The These configurations can be mode on the From BIND DNS Server<\/strong> interface, click Edit Config File<\/strong>. By default, you will see the Hence, click on the drop down menu and select the Click save and close to return to zone list.<\/p>\n\n\n\n Some of the configuration options used above are;<\/p>\n\n\n\n Next, test the options configuration file we edited above by clicking on Check BIND Config<\/strong> under the Bind DNS server global server options.<\/p>\n\n\n\n If there is no syntax error with the configuration file, you will see such an output.<\/p>\n\n\n\n Next, you need to create the master forward and reverse zone statements. Click Create master zone<\/strong> on the BIND DNS server interface. This will open up a wizard where you can define the zone statement details.<\/p>\n\n\n\n To begin with, create the forward zone statement (Forward: Names to Addresses)<\/strong> as shown in the screenshot below. Note, the @ in the email address will be converted to dot (.) in SOA records.<\/p>\n\n\n\n Click Create<\/strong> to create the master forward zone statement.<\/p>\n\n\n\n Next, create reverse zone statement by clicking Return to zone list<\/strong> > Create master zone<\/strong>. This time round, select Reverse: Addresses to Names<\/strong>.<\/p>\n\n\n\n Click Create<\/strong> to create the master reverse zone statement.<\/p>\n\n\n\n On the master zone configuration page, click Addresses<\/strong>. To begin with, set the A record for your DNS server.<\/p>\n\n\n\n Click Create<\/strong> to set the DNS server address A record. Next, you can add more addresses for other hosts.<\/p>\n\n\n\n Once done, click Return to records type<\/strong>.<\/p>\n\n\n\n Click Name Server<\/strong> on Master zone configuration page. If the name server record is not already set, for the zone name<\/strong>, enter the your domain for example, kifarunix-demo.com<\/strong> and for Name Server enter the FQDN of the DNS server, e.g ns1.kifarunix-demo.com<\/strong>.<\/p>\n\n\n\n Click Create<\/strong> to add the name server records. Once done, click Return to zone list<\/strong><\/p>\n\n\n\n You should now have two master zones set (forward and reverse zones) with each having defined A records and PTR records respectively.<\/p>\n\n\n\n To check the validity of the zone configuration, click on Check BIND config<\/strong>.<\/p>\n\n\n\n To restart BIND on the web interface, stop and start it by clicking the stop and play buttons on the top right corner of the interface. See the highlighted section in the screenshot below.<\/p>\n\n\n\n If UFW is running, simply open the terminal (Alt+k)<\/strong> and run the command below to allow BIND.<\/p>\n\n\n\n To check if our DNS is working, we are going to use Fedora 30. Hence, login and create the interfaces IP addresses and DNS server details as shown below.<\/p>\n\n\n\n Set the DNS Server<\/p>\n\n\n\n Set the DNS search domain.<\/p>\n\n\n\n Bring up the interface.<\/p>\n\n\n\n Check the DNS Server.<\/p>\n\n\n\n Next, try to ping our host server (u18srv<\/strong>) that we added to the DNS server while setting the A records.<\/p>\n\n\n\n Try to resolve the DNS server hostnames using dig command.<\/p>\n\n\n\n Resolve Ubuntu 18 hostname;<\/p>\n\n\n\n Perform Reverse Lookup (PTR Records)<\/p>\n\n\n\n Using host command;<\/p>\n\n\n\n Reverse Lookup of DNS Server hostname.<\/p>\n\n\n\n Well, there you go.<\/p>\n\n\n\n Configure BIND as Slave DNS Server on Ubuntu 18.04<\/a><\/p>\n\n\n\n Configure BIND as DNS Server on Ubuntu 18.04<\/a><\/p>\n\n\n\n Install PowerDNS with MariaDB Backend on Fedora 30\/29\/CentOS 7<\/a><\/p>\n\n\n\nInstall and Configure Bind DNS Using Webmin on Debian 10<\/h3>\n\n\n\n
Login to Webmin as Administrative User<\/h3>\n\n\n\n
<\/a><\/figure><\/div>\n\n\n
Run System Update<\/h3>\n\n\n\n
apt update -y<\/code><\/pre>\n\n\n\n
Install Bind DNS Server Module<\/h3>\n\n\n\n
<\/a><\/figure>\n\n\n\n
<\/a><\/figure>\n\n\n\n
Configuring BIND DNS Server Using Webmin<\/h3>\n\n\n\n
Configure Access Control List<\/h3>\n\n\n\n
<\/a><\/figure>\n\n\n\n
allowed<\/code> to define the networks (
192.168.56.0\/24<\/code>) of the hosts allowed to query our DNS server. Save the changes and click Return to zone list.<\/strong><\/p>\n\n\n\n
Define global server configuration options<\/h3>\n\n\n\n
options<\/code> statement is used to set up global options to be used by BIND such as define the hosts are allowed to ask ordinary DNS questions, specify the location of the
named<\/code> working directory, the types of queries allowed, specify which hosts are allowed to make recursive queries through the DNS server<\/p>\n\n\n\n
\/etc\/bind\/named.conf.options<\/code> configuration file.<\/p>\n\n\n\n
\/etc\/bind\/named.conf<\/code> configuration file selected.<\/p>\n\n\n\n
\/etc\/bind\/named.conf.options<\/code> configuration file. Make the changes on the file as shown in screenshot below;<\/p>\n\n\n\n
<\/a><\/figure>\n\n\n\n
\n
IPv4<\/code> network interface on which to listen for queries.<\/li>\n\n\n\n
yes<\/code>.<\/li>\n\n\n\n
IPv6<\/code> network interface on which to listen for queries.<\/li>\n<\/ul>\n\n\n\n
<\/a><\/figure>\n\n\n\n
Create BIND DNS Server Master Zone Statements<\/h4>\n\n\n\n
<\/a><\/figure>\n\n\n\n
<\/a><\/figure>\n\n\n\n
Set the A Records<\/h3>\n\n\n\n
<\/a><\/figure>\n\n\n\n
Create Name Server (NS) Records<\/h3>\n\n\n\n
<\/a><\/figure>\n\n\n\n
<\/a><\/figure>\n\n\n\n
Verify Zone Configuration Syntax<\/h3>\n\n\n\n
Running BIND<\/h4>\n\n\n\n
<\/figure>\n\n\n\n
ufw allow Bind9<\/code><\/pre>\n\n\n\n
Verify if BIND is Working<\/h3>\n\n\n\n
nmcli con add type ethernet ifname enp0s8 con-name enp0s8 ipv4.addresses 192.168.56.114\/24 connection.autoconnect yes<\/code><\/pre>\n\n\n\n
nmcli con mod enp0s8 ipv4.method manual<\/code><\/pre>\n\n\n\n
nmcli con mod enp0s8 ipv4.dns 192.168.56.105<\/code><\/pre>\n\n\n\n
nmcli con mod enp0s8 ipv4.dns-search kifarunix-demo.com<\/code><\/pre>\n\n\n\n
nmcli con up enp0s8<\/code><\/pre>\n\n\n\n
nmcli dev show enp0s8 | grep -i dns\nIP4.DNS[1]: 192.168.56.105<\/code><\/pre>\n\n\n\n
ping u18srv -c 4<\/code><\/pre>\n\n\n\n
PING u18srv.kifarunix-demo.com (192.168.56.108) 56(84) bytes of data.\n64 bytes from 192.168.56.108 (192.168.56.108): icmp_seq=1 ttl=64 time=0.871 ms\n64 bytes from 192.168.56.108 (192.168.56.108): icmp_seq=2 ttl=64 time=0.377 ms\n64 bytes from 192.168.56.108 (192.168.56.108): icmp_seq=3 ttl=64 time=0.792 ms\n64 bytes from 192.168.56.108 (192.168.56.108): icmp_seq=4 ttl=64 time=0.818 ms\n\n--- u18srv.kifarunix-demo.com ping statistics ---\n4 packets transmitted, 4 received, 0% packet loss, time 109ms\nrtt min\/avg\/max\/mdev = 0.377\/0.714\/0.871\/0.198 ms<\/code><\/pre>\n\n\n\n
dig ns1.kifarunix-demo.com<\/code><\/pre>\n\n\n\n
; <<>> DiG 9.11.9-RedHat-9.11.9-1.fc30 <<>> ns1.kifarunix-demo.com\n;; global options: +cmd\n;; Got answer:\n;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30425\n;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1\n\n;; OPT PSEUDOSECTION:\n; EDNS: version: 0, flags:; udp: 4096\n; COOKIE: 3f9abdac800a3185f47f59b45d8a6bdb9febaa9aa9179802 (good)\n;; QUESTION SECTION:\n;ns1.kifarunix-demo.com.\t\tIN\tA\n\n;; ANSWER SECTION:\nns1.kifarunix-demo.com.\t38400\tIN\tA\t192.168.56.105\n\n;; AUTHORITY SECTION:\nkifarunix-demo.com.\t38400\tIN\tNS\tns1.kifarunix-demo.com.\n\n;; Query time: 2 msec\n;; SERVER: 192.168.56.105#53(192.168.56.105)\n;; WHEN: Tue Sep 24 22:17:50 EAT 2019\n;; MSG SIZE rcvd: 109<\/code><\/pre>\n\n\n\n
dig u18srv.kifarunix-demo.com<\/code><\/pre>\n\n\n\n
; <<>> DiG 9.11.9-RedHat-9.11.9-1.fc30 <<>> u18srv.kifarunix-demo.com\n;; global options: +cmd\n;; Got answer:\n;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 445\n;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2\n\n;; OPT PSEUDOSECTION:\n; EDNS: version: 0, flags:; udp: 4096\n; COOKIE: b0214a69bddd5d265abd78305d8a6c17ee60809d19c6e347 (good)\n;; QUESTION SECTION:\n;u18srv.kifarunix-demo.com. IN A\n\n;; ANSWER SECTION:\nu18srv.kifarunix-demo.com. 38400 IN A 192.168.56.108<\/strong>\n\n;; AUTHORITY SECTION:\nkifarunix-demo.com. 38400 IN NS ns1.kifarunix-demo.com.\n\n;; ADDITIONAL SECTION:\nns1.kifarunix-demo.com. 38400 IN A 192.168.56.105\n\n;; Query time: 2 msec\n;; SERVER: 192.168.56.105#53(192.168.56.105)\n;; WHEN: Tue Sep 24 22:18:50 EAT 2019\n;; MSG SIZE rcvd: 132<\/code><\/pre>\n\n\n\n
dig -x 192.168.56.104<\/code><\/pre>\n\n\n\n
; <<>> DiG 9.11.9-RedHat-9.11.9-1.fc30 <<>> -x 192.168.56.104\n;; global options: +cmd\n;; Got answer:\n;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9727\n;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2\n\n;; OPT PSEUDOSECTION:\n; EDNS: version: 0, flags:; udp: 4096\n; COOKIE: c6bc69eca7e20dca47e4e3b95d8a757a39ffb62e91345fa4 (good)\n;; QUESTION SECTION:\n;104.56.168.192.in-addr.arpa. IN PTR\n\n;; ANSWER SECTION:\n104.56.168.192.in-addr.arpa. 38400 IN PTR cent7.kifarunix-demo.com.\n<\/strong>\n;; AUTHORITY SECTION:\n56.168.192.in-addr.arpa. 38400 IN NS ns1.kifarunix-demo.com.\n\n;; ADDITIONAL SECTION:\nns1.kifarunix-demo.com. 38400 IN A 192.168.56.105\n\n;; Query time: 1 msec\n;; SERVER: 192.168.56.105#53(192.168.56.105)\n;; WHEN: Tue Sep 24 22:58:53 EAT 2019\n;; MSG SIZE rcvd: 156<\/code><\/pre>\n\n\n\n
host u18srv.kifarunix-demo.com<\/code><\/pre>\n\n\n\n
u18srv.kifarunix-demo.com has address 192.168.56.108<\/code><\/pre>\n\n\n\n
host 192.168.56.105<\/code><\/pre>\n\n\n\n
105.56.168.192.in-addr.arpa domain name pointer ns1.kifarunix-demo.com.<\/code><\/pre>\n\n\n\n
Related Tutorials<\/h3>\n\n\n\n