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.
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 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
May be interested
- Instructions for installing Windows software on Linux with PlayOnLinuxplayonlinux provides a point and click interface (point and click) to automatically install and edit software on linux. it is like a package manager but for windows games and other applications on linux.
- Search for files and directories in Linux using the command line interfaceyou can use the graphical file management utility to find files in linux like nautilus in gnome, dolphin in kde and thunar in xfce. however, there are several ways to use the command line to find files in any linux desktop management utility.
- Instructions for creating a master partition in Ubuntuubuntu does not use a separate master partition by default, although many linux users prefer this. use a separate master partition to allow you to reinstall ubuntu without losing personal files and settings.
- How to install software and applications for Linux operating systemshere are some ways to install new software for ubuntu based on available tools.
- Instructions for installing Ubuntu on VMware Workstation - Part 1for some reason, can't you continue to use windows (royalties)? you want to discover a certain operating system that is enough to replace the already familiar windows? you just need 1 software, some operating system to meet the needs of working very simple? check out the free and completely open source ubuntu operating system.
- Instructions for installing Ubuntu on VMware Workstation - Part 2in the previous section of the article, we jointly established vmware and ubuntu desktop. and the next section below, please continue with the steps to install ubuntu desktop on vmware workstation.