DNS setup with Webmin


1. The BIND daemon must be installed and running.
a. Make sure BIND is installed. You should see output similar to the following:
[root@dedi1 ~]# rpm -qa | grep -i bind
[root@dedi1 ~]#

2. BIND should also be configured to start at boot. Enter the following command:
[root@dedi1 ~]# chkconfig --level 3 named on
[root@dedi1 ~]#

DNS on Webmin

A. Logging in to Webmin
Open a browser and point it to the IP of the server and specify port 10000. For example:

You will need to log in as root so make sure you have the password. If you do not have the root password, you can get it from within the Control Center under the Server --> Site User Admin menu option.

B. Creating Zones

1. Once successfully logged in we can create a zone. To create a zone, click on the Servers icon on the top navigation screen, then click on the BIND DNS Server icon.

2. First, a Master Zone must be created. To create a new Master Zone, click on Create Master Zone. While creating records make sure to include a trailing period at the end of an absolute name, “example.com.”, “mail.example.com.”.

The Domain Name is your Zone, Example.com. The Master Server is the primary DNS server for the zone, “ns1.example.com.”. Enter an email address. When you are done click the create button on the bottom left.

C. Creating Records

1. ‘A’ Records
a. An A Record sets an IP address with the domain name.

2. ‘NS’ Records
a. Create NS Records for the name servers, usually two. For example, Enter “example.com.” for the Zone Name, enter “ns1.example.com.” for the Name Server. Repeat this step for a second NS Record for “ns2.example.com.”

b. The two NS records must also be defined using an ‘A’ record for each name server.

3. ‘C’ CName records
a. CName Records creates a name alias. This creates a name that resolves to a different domain. For example, enter “www.example.net.” for Name and “example.com.” for Real Name and http://www.example.com will resolve to http://example.com.

4. ‘MX’ Records
a. First create an ‘A’ record for mail.example.com. Next, create a ‘MX’ record using a Name of “example.com.”. Set the Mail Server field to “mail.example.com”. Use the lowest priority available, usually 1 for a single mail server.

D. Test the Setup

1. Use the dig command to test the DNS setup. From a prompt, type:
[root@server ~]# dig example.com

You should see an output similar to the following:

; <<>> DiG 9.2.4 <<>> example.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15670
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2,ADDITIONAL:2

;example.com. IN A

example.com. 172745 IN A

example.com. 21545 IN NS b.iana-servers.net.
example.com. 21545 IN NS a.iana-servers.net.

a.iana-servers.net. 172745 IN A
b.iana-servers.net. 172745 IN A

;; Query time: 4 msec
;; WHEN: Wed Jan 11 10:16:53 2006
;; MSG SIZE rcvd: 125

[root@server ~]#

E. Contact the Domain Registrar
Once BIND is setup, you can pass your name server information to the domain registrar.

F. Final Testing
You can use www.dnsreport.com. Browse to www.dnsreport.com and enter your domain. Dnsreport.com will give you detailed results about your domain.

Add Feedback