DNS: Configure a caching-only name server

Share this link

Install the bind package:

# yum install -y bind

Edit the /etc/named.conf file and change the ‘listen-on’ option from 127.0.0.1 to any:

listen-on port 53 { any; };

In the same file, change the ‘allow-query’ option from localhost to any:

allow-query { any; };

In the same file, disable the ‘dnssec-validation‘ option:

dnssec-validation no;

Check the configuration file:

# named-checkconf

Add two new rules to the firewall:

# iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 53 -j ACCEPT
# iptables -I INPUT -m state --state NEW -m udp -p udp --dport 53 -j ACCEPT

Save the firewall configuration:

# service iptables save

Activate the DNS service:

# chkconfig named on

Start the DNS service:

# service named start

Check the configuration:

# nslookup cnn.com 127.0.0.1
# dig @127.0.0.1 cnn.com
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Leave a Reply

Upcoming Events (Local Time)

There are no events.

RHCSA7: Task of the day

Allowed time: 10 minutes.
Create two new user accounts "steve" and "oliver".
Create a group "team". Create a directory "shared".
All files put into the "shared" directory by "steve" or "oliver" should belong to the "team" group and be only visible by them.

RHCE7: Task of the day

Allowed time: 8 minutes.
Set up an iScsi target based on a fileio backstore of 100MB called /opt/shareddata with CHAP authentication (username=usr/password=pwd), xfs filesystem and standard firewall configuration.

Follow me on Twitter

Poll for favorite RHEL 7 book

What is your favorite RHEL 7 book to prepare RHCSA & RHCE exams?

View Results

Loading ... Loading ...

Poll for most difficult RHCSA 7 topic

What do you think is the most difficult RHCSA 7 topic?

View Results

Loading ... Loading ...

Poll for most difficult RHCE 7 topic

What do you think is the most difficult RHCE 7 topic?

View Results

Loading ... Loading ...