How to configure DNS Server on Ubuntu Server 11.04
DNS Server is a server with domain name resolution function. In this article, we will detail the steps to install and configure DNS Server on Linux with Ubuntu Server version 11.04.
DNS Server is a server with domain name resolution function. In this article, we will detail the steps to install and configure DNS Server on Linux with Ubuntu Server version 11.04.
1. Install
After setting a static IP address for the server to take the DNS Server role, you perform the following commands to install the BIND9 package (using the DNS service configuration on Linux):
# sudo -i
# apt-get update
# apt-get install bind9
After the installation is successful, you get the main directory, / etc / bind . In this directory, you will configure the following files:
/etc/bind/named.conf.local
/etc/bind/db.local
DNS database file (eg /etc/bind/db.hoanghac.org )
2. Configuration
First, open the file /etc/bind/named.conf.local and add a new zone, such as hoanghac.org :
zone "hoanghac.org" {
type master;
file "/etc/bind/db.hoanghac.org";
};
Next, create the DNS database file /etc/bind/db.hoanghac.org by copying the content from the sample file /etc/bind/db.local :
# cp /etc/bind/db.local /etc/bind/db.hoanghac.org
At this point, edit the file /etc/bind/db.hoanghac.org by replacing localhost. equal to the full name of the DNS server (FQDN). Replace 127.0.0.1 with the IP address of DNS Server and root.localhost to an exact email address, but use the "." instead of the "@" symbol, you also create a record (A) corresponding to ns.hoanghac.org . The contents of the file will look like this:
;
; BIND dữ liệu tập tin cho địa chỉ loopback interface
;
$ TTL 604800
@ IN SOA ns.hoanghac.org. root.hoanghac.org. (
2 ; Serial
604800; Refresh
86400; Retry
2419200; Expire
604800); Negative Cache TTL
;
@ IN NS ns.hoanghac.org.
@ IN A 192.168.1.10
@ IN AAAA :: 1
ns IN A 192.168.1.10
Next, restart the BIND9 service for the configuration operations to take effect:
# /etc/init.d/bind9 restart
3. Check
To check the performance of the DNS Server, use the ping command as follows:
# ping ns.hoanghac.org
- Instructions for installing Ubuntu Web Server on remote host
- Ubuntu Server Upgrade Steps
- How to install FTP Server on Ubuntu
- How to Install Ubuntu Server
- How to configure static IP address on Ubuntu 22.04 LTS and 22.10
- How to Set Up an FTP Server on Ubuntu Linux
- How to install desktop/GUI environment in Ubuntu Server
- Instructions for creating virtual hosts with Apache in Ubuntu
- Install and configure Apache in Ubuntu
- Instructions for configuring IPv6 on Windows Server
- How to configure network on Ubuntu using Netplan
- How to install and configure MySQL server on Pi
- How to avoid restarting the server with Ubuntu Livepatch
- What's New in Ubuntu 21.10?