Linux DNS config
CentOS 6.5
Point to current DNS Sever:
add following context in /etc/sysconfig/network-scripts/ifcfg-eht0
DNS1=<DNS Server IP>
Setup the DNS Server:
Example
DNS server ip: 12.11.0.132
Domain name: test.local
hostname: puppet.test.local
1. install package: yum install bind*
2. config
A. vi /etc/named.conf
change context to
listen-on port 53 { any; };
listen-on-v6 port 53 { any; };
add context:
zone "test.local" in {
type master;
file "test.local.zone";
};
zone "0.11.12" in {
type master;
file "0.11.12.zone";
};
B. vi /var/named/0.11.12.zone
$TTL 43200
@ IN SOA dns.test.local. puppet.test.local. (
2014101502
2H
10M
7D
1D )
IN NS dns.test.local.
132 IN PTR puppet.test.local.
C. vi /var/named/test.local.zone
$TTL 43200
@ IN SOA dns.test.local. puppet.test.local. (
2014101501
2H
10M
7D
1D )
@ IN NS dns
dns IN A 12.11.0.132
puppet IN A 12.11.0.132
3. start service: service named start
Comments
Post a Comment