DNS Server Configuration


Below steps were executed on real server. I have mentioned only the important commands/entries required to setup DNS server. In this scenario, there is only 1 client is configured to test the setup. 


[root@server etc]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=server.example.com


[root@server etc]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.0.10 server.example.com server
192.168.0.12 client1.example.com client1

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


#cat named.conf
options {
        listen-on port 53 { 127.0.0.1; 192.168.0.10;};
        #listen-on-v6 port 53 { ::1; };


allow-query     { any;};


include "/etc/named.rfc1912.zones";
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

#cat /etc/named.rfc1912.zones

zone "example.com" IN {
        type master;
        file "forward.zone";
        allow-update { none; };
};

zone "0.168.192.in-addr.arpa" IN {
        type master;
        file "reverse.zone";
        allow-update { none; };

};

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

#cd /var/named

[root@server named]# cat forward.zone
$TTL 1D
@       IN SOA  server.example.com. root.server.example.com. (
                                        0       ; serial
                                        1D      ; refresh
                                        1H      ; retry
                                        1W      ; expire
                                        3H )    ; minimum
        IN NS   server.example.com.
server  IN A    192.168.0.10
client1 IN A    192.168.0.12
[root@server named]# cat reverse.zone
$TTL 1D
@       IN SOA  server.example.com. root.server.example.com. (
                                        0       ; serial
                                        1D      ; refresh
                                        1H      ; retry
                                        1W      ; expire
                                        3H )    ; minimum
        IN NS   server.example.com.
10      IN PTR  server.example.com.
12      IN PTR  client1.example.com.

No comments:

Post a Comment

Installation of Jenkins on Linux and Deployment NGINX through Jenkins

Installation of Jenkins: [root@worker1 ~]# useradd -c "jenkins user" jenkins [root@worker1 ~]# passwd jenkins Changing passw...