How To Install Bind9 On Ubuntu 16.04
Install DNS Bind9 on Linux Ubuntu Server
/ Tuesday, 30 Nov 2022 / Published in Uncategorized
How To Install and Configure DNS Server on Ubuntu 16.04 LTS
Demark is a widely used DNS Server. Ideally, DNS server consist of ii machines that piece of work together simultaneously, one human action as master and the other 1 act equally slave. If your domain registrar doesn't provide you a free DNS server, or if you want to create a custom DNS record, so yous might need to host your own DNS server.
This article assumes you take at least basic noesis of linux, know how to use the shell, and most chiefly, you lot host your site on your ain VPS. The installation is quite unproblematic and assumes yous are running in the root account, if not you may need to add together 'sudo' to the commands to get root privileges. I will prove you through the step by step installation and configure DNS server on ubuntu on a Ubuntu 16.04 (Xenial Xerus) server.
Install and Configure DNS Server on Ubuntu 16.04 LTS
Host Office Individual FQDN Private IP Address
ns1 Primary DNS Server 192.168.100.10
ns2 Secondary DNS Server 192.168.100.9
R1 default-gateway 192.168.100.ane
Footstep 1. Showtime brand certain that all your organisation packages are upward-to-appointment by running these post-obit apt-become commands in the terminal.
sudo apt-get update
sudo apt-go upgrade
Pace 2. Installing DNS Server Bind9.
After updating the system, run the following control to install BIND9 packages which are used to setup DNS server:
apt-get install bind9 bind9utils bind9-dr.
Step iii. Configure Bind9.
It is time to show you a basic configuration how to setup your domain to resolve to your server:
### nano /etc/demark/named.conf.options
options {
directory "/var/cache/bind";
boosted-from-auth no;
boosted-from-enshroud no;
version "Bind Server";
// If there is a firewall between y'all and nameservers you want
// to talk to, you may demand to fix the firewall to allow multiple
// ports to talk. See http://www.kb.cert.org/vuls/id/800113
// If your Internet access provider provided one or more IP addresses for stable
// nameservers, yous probably want to utilise them equally forwarders.
// Uncomment the post-obit cake, and insert the addresses replacing
// the all-0's placeholder.
forwarders {
192.168.100.ane; // router ip address
8.viii.8.8;
8.eight.four.four;
};
//========================================================================
// If BIND logs mistake letters about the root central being expired,
// you volition need to update your keys. See https://world wide web.isc.org/bind-keys
//========================================================================
dnssec-validation auto;
allow-recursion { 127.0.0.1; };
auth-nxdomain no; # accommodate to RFC1035
heed-on-v6 { whatsoever; };
};
Step 4. Configure Local File.
Adjacent, we will configure the local file, to specify our DNS zones:
nano /etc/bind/named.conf.local
//place these lines at the bottom of file
zone "itnetspace.net" {
type chief;
file "/etc/demark/zones/itnetspace.cyberspace.db";
allow-transfer { 192.168.100.9; };
besides-notify { 192.168.100.ix; };
};
Because in the above config we put zone file in "/etc/bind/zones/itnetspace.net.db", then nosotros need to create the folder and file:
mkdir /etc/demark/zones
nano /etc/demark/zones/itnetspace.cyberspace.db
$TTL 86400
$ORIGIN itnetspace.internet.
@ IN SOA ns1.itnetspace.net. root.itnetspace.net. (
1 ; Series
86400 ; Refresh
7200 ; Retry
2419200 ; Expire
604800 ) ; Negative Enshroud TTL
;
@ IN NS ns1.itnetspace.net.
@ IN NS ns2.itnetspace.internet.
ns1 IN A 192.168.100.x
ns2 IN A 192.168.100.nine
;also list other computers
@ IN A 192.168.100.ten
www IN A 192.168.100.10
Step5. Restart the bind9 service
That's it for the configuration, now you need to restart the DNS bind9 by executing the command:
systemctl restart bind9.service
To cheque if the service is running execute:
systemctl condition bind9.service
Hope this have been informative for you and thanks.
Source: https://itnetspace.net/install-dns-bind9-on-linux-ubuntu-server/
Posted by: cahoonladvized.blogspot.com
0 Response to "How To Install Bind9 On Ubuntu 16.04"
Post a Comment