How to configure DNS server & client in Linux RedHat

5 pts.
Tags:
DNS
DNS server
Linux
Linux administration
Red Hat
tecnical
How can I configure a DNS server & client in Linux RedHat?
ASKED: December 24, 2010  8:23 AM
UPDATED: April 4, 2014  5:30 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

First check the packages that are there

bind; bind-utils; bind-libs; bind-chroot;caching-nameserver.
Now reboot and start/stop/restart BIND as
# /etc/init.d/named start
# /etc/init.d/named stop
# /etc/init.d/named restart

Now open /etc/resolv.conf in your favorite editor and insert as

domain <machinename> for eg. mycomp
search <same name> net mycomp
nameserver <nameserverIP>
nameserver <nameserverIP> (maximum three allowed)
Now for caching nameserver entered as
nameserver 127.0.0.1

The main DNS configuration is kept in the file /etc/named.conf  which is used to tell BIND where to find the configuration files for each domain you own.
Here, locate the below line and change as….

zone "mycomp" IN { (here put the name instead of localhost)
type master;
file "mycomp.zone";
allow-update { none; };
};

Remember, By default, zone files are located in directory /var/named.
Now test with dig or nslookup command.
CAUTION: You have to change as your own requirement.
For more complete info, check this out.
Thanks–

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • orangehat
    If you are at not easy with command line download webmin (www.webmin.com) and via it's gui define dns and dhcp. Some examples to take a gander at: http://doxfer.webmin.com/Webmin/DHCPServer http://forums.devshed.com/dns-36/setting-up-dns-using-webmin-406190.html I use command line but webmin allows me to have my cohorts (windows admins) do some of the changes when I'm on vacation.
    1,475 pointsBadges:
    report
  • Sixball
    Nothing beats knowledge and skill on the CLI (go IOS!), but for GUI-lovers - like Orangehat mentioned - Webmin is a great tool...
    8,515 pointsBadges:
    report
  • Sujeet646
    [...] How to configure DNS server & client in Linux RedHat [...]
    0 pointsBadges:
    report
  • Genderhayes
    Red Hat versions 5.1 and earlier used the BIND 4.x package, which used a slightly different format for its configuration file. BIND 8.x offers more functionality over that offered by BIND 4.x, and as 4.x is no longer being developed, you should probably consider upgrading your BIND package to the latest version. Simply install the BIND RPM package
    3,825 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following