De Help Desk punt NL
Kennisbank
De Helpdesk > De Helpdesk > Kennisbank

DNS instellen via Webmin

Oplossing

OS: Fedora 10

 

If you're like me, you've setup DNS many times before on many different machines, but its one of those things that never quite stick in your head.  Its a bit like knowing that somewhere in Year 9, you've done Simpsons Rule for calculus, but if you were asked to prove it, you'd have no idea.  Its just one of those useless wonders, what you encounter in a blue moon.  Of course, if you're a system administrator full time you are probably exposed to this quite often, but for me, I just do it when needed.  And everytime I need to do it, I need to google it.  Well, time to write it down and bookmark it!

 

Why Webmin?

 

Webmin makes certain things easier, especially tedious system administration tasks that you only do once in a blue moon.  DNS is one of those things.  For the following, lets assume that you are creating a DNS entry for your new domain "yourdomain.com".  Remember, this is without the "www" part. 

 

Create a Master Zone

 

1) Webmin menu on the left, click on "Servers", then click on "BIND DNS Server".  This will open up the BIND DNS Server Page.  If you do not have this, then you do not have BIND setup on your machine.  You will need to install BIND by:

 

$ yum install bind

Loaded plugins: refresh-packagekit
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package bind.i386 32:9.5.1-1.P1.fc10 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 
Package       Arch          Version                     Repository        Size
================================================================================
Installing:
 bind          i386          
32:9.5.1-1.P1.fc10          updates          3.3 M

Transaction Summary
================================================================================
Install      1 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 3.3 M
Is this ok [y/N]: y
Downloading Packages:
bind
-9.5.1-1.P1.fc10.i386.rpm                            | 3.3 MB     00:04
============================== Entering rpm code ===============================
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
 
Installing     : bind                                                     1/1
=============================== Leaving rpm code ===============================

Installed:
  bind
.i386 32:9.5.1-1.P1.fc10

Complete!

 

Once installed BIND, you will need to refresh the Webmin modules - on the left hand menu towards the bottom, click on "Refresh Modules".  Then log out, log back in, and the BIND DNS menu option will be there.

 

2) Under the "Existing DNS Zones" click on "Create master zone".

3) Fill out the following:

  - "Domain name / Network": yourdomain.com

  - "Master Server" : yourdomain.com

  - "IP address for template records": [ your external IP address as provided to you (xxx.xxx.xxx.xxx) ]

  - Click on "Create"

4) This will take you to the "Edit Master Zone" page. 

 

Create Address Records (A)

 

1) Click on "Address"

2) Fill out the following:

  - "Name" : [ leave this blank ]

  - "Address" : [ your IP address ]

  - Click on "Create" 

3) Fill out the following:

  - "Name" : www

  - "Address" : [ your IP address ]

  - Click on "Create"

4) Fill out the following:

  - "Name" : mail

  - "Address" : [ your IP address ]

  - Click on "Create"

5) Fill out the following:

  - "Name" : ftp

  - "Address" : [ your IP address ]

  - Click on "Create"

6) Fill out the following:

  - "Name" : ns1

  - "Address" : [ your IP address ]

  - Click on "Create"

7) Fill out the following:

  - "Name" : ns2

  - "Address" : [ your IP address ]

  - Click on "Create"

8) You can keep doing this for more names that you want to use.  These names are then used when someone types in "name.yourdomain.com".  Essentially, these are subdomains that you are setting up, but you are just pointing them to the same server.

9) Once done, click on "Return to record types" at the bottom of the page.

 

Create NameServer Records (NS)

 

1) Click on "Name Server"

2) Fill out the following:

  - "Zone Name" : yourdomain.com. [note the trailing period is required here]

  - "Name Server" : ns1.yourdomain.com. [note the trailing period is required here]

  - Click on "Create"

3) Fill out the following:

  - "Zone Name" : yourdomain.com. [note the trailing period is required here]

  - "Name Server" : ns2.yourdomain.com. [note the trailing period is required here]

  - Click on "Create"

4) Once done, click on "Return to record types" at the bottom of the page.

 

Create Mail Exchange Record (MX)

 

1) Click on "Mail Server"

2) Fill out the following:

  - "Name" : yourdomain.com

  - "Mail Server" : mail.yourdomain.com

  - "Priority" : 10

  - Click on "Create"

3) Once done, click on "Return to record types" at the bottom of the page.

 

Allow Access

 

0) If you are not on the main options screen, click on the left hand menu "BIND DNS Server".

1) Click on "Zone Defaults"

2) Under "Default Zone Settings", "Allow queries from" box, select "Listed" and change the box from "localhost" to "any".  This will allow anyone to query your DNS server.

3) Click on "Save"

4) Click on "Return to zone list" at the bottom of the page.

5) Click on "Addresses and Topology".

6) Under "Global address and topology options", under "Ports and address to listen on", select "Listed below" and in the first row, make sure that "Default" is not selected, and the second radio box is selected.  In the text box there should be "53" indicating that we are running DNS on port 53.  In the "Address" column, change the value to "any" to allow anyone to access this port.

7) Click on "Save"

 

Restart

 

1) In the top right hand corner, "Stop BIND" and then "Start BIND" to restart the service.  DNS typically takes 72 hours to propogate, but more often than not, it takes less than an hour for local DNS servers to pick up.

 
Was dit artikel bruikbaar? ja / nee
Gerelateerde artikelen Nagios installeren op CentOS 7
Nagios installeren op Fedora 12
DNS bind named (network unreachable)
Amanda - Creating Successful Backups
16 Useful .htaccess Tricks and Hacks For Web Developers
Backups using Rsync, Bash & Cron
Artikel details
Artikel ID: 169
Categorie: Webserver
Zoekwoorden
Datum toegevoegd: 21-Feb-2013 20:49:38
Aantal bekeken: 522
Beoordeling (Stemmen): Artikel beoordeeld 3.4/5.0 (27)

 
« Ga terug