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
You should read it
- How to manage remote Linux server using SSH
- The 5 best Linux server distributions
- How to set up your own Git server on Linux
- 7 Enterprise Linux Server Distributions
- New points in SQL Server 2017
- 12 best Linux server operating systems
- How to Set Up an FTP Server on Ubuntu Linux
- How to set DNS nameserver in Ubuntu Server 18.04
- How to Set up an FTP Server in Ubuntu Linux
- How to Install Ubuntu Server
- The difference between web server and app server
- How to install FTP Server on Ubuntu
Maybe you are interested
How to pin a drive to the Taskbar to open it quickly How to delete the clipboard on Windows 10 Invite to download the space theme wallpapers on the NASA XS inspired by NASA Google promises to give priority to quickly fix Chrome's battery drain error 18 'extremely creative' inventions are available only in Japan 8 things you can do when you feel bored