Configure DNS Server Fedora 7 & 8

11:09 AM / Diposting oleh Sharing IT / komentar (0)

[root@brainwash /]# rpm -qa|grep bind
bind-libs-9.4.0-6.fc7
rpcbind-0.1.4-6.fc7
bind-9.4.0-6.fc7
ypbind-1.19-9.fc7
bind-utils-9.4.0-6.fc7
bind-chroot-9.4.0-6.fc7

[root@brainwash /]# nano /var/named/chroot/etc/named.conf
options {
listen-on port 53 { 127.0.0.1; 192.167.10.1; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { localhost; 192.167.10.0/24; };
recursion yes;
};

logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};

zone "." IN {
type hint;
file "named.ca";
};

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


#### Edit by bafrin ####

zone "tester.net" IN {
type master;
file "tester.net.db";
};

zone "10.167.192.in-addr.arpa" IN {
type master;
file "tester.net.rev";
};

Make shorcut link file to /etc/
[root@brainwash /]# ln -sf /var/named/chroot/etc/named.conf /etc/

[root@brainwash /]# nano /var/named/chroot/var/named/tester.net.db
$TTL 86400
@ IN SOA brainwash.tester.net. test.tester.net.(
2010080200;
86400;
3600;
360000;
86400;
)
IN NS brainwash.tester.net.

brainwash.tester.net. IN A 192.167.10.1

[root@brainwash /]# nano /var/named/chroot/var/named/teseter.net.rev
$TTL 86400
@ IN SOA brainwash.tester.net. pwm.tester.net.(
2010080200;
86400;
3600;
360000;
86400;
)
IN NS brainwash.tester.net.
1 IN PTR brainwash.tester.net.

Make shortcut link file to /var/named/
[root@brainwash /]# ln -sf /var/named/chroot/var/named/tester.net.db /var/named/
[root@brainwash /]# ln -sf /var/named/chroot/var/named/tester.net.rev /var/named/

Edit file resolv.conf
[root@brainwash /]# nano /etc/resolv.conf
search tester.net
nameserver 192.167.10.1
nameserver 208.67.220.220
nameserver 208.67.222.222

Edit and Input file hosts
[root@brainwash /]# nano /etc/hosts
127.0.0.1 brainwash.tester brainwash localhost.localdomain localhost
192.167.10.1 brainwash.tester.net brainwash

Edit and Input file host.conf
[root@brainwash /]# nano /etc/host.conf
#order hosts,bind
order bin,host
multi on

Make your DNS Server automaticaly run after restart your system
[root@brainwash /]# chkconfig named on

Cek Your Service
[root@brainwash /]# netstat -an|grep 53
tcp 0 0 192.167.10.1:53 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN
tcp 0 0 ::1:53 :::* LISTEN
tcp 0 0 ::1:953 :::* LISTEN
udp 0 0 192.167.10.1:53 0.0.0.0:*
udp 0 0 127.0.0.1:53 0.0.0.0:*
udp 0 0 0.0.0.0:5353 0.0.0.0:*
udp 0 0 ::1:53 :::*
udp 0 0 :::5353 :::*

Cek Your DNS Server
[root@brainwash /]# nslookup brainwash.tester.net
Server: 192.167.10.1
Address: 192.167.10.1#53

Name: brainwash.tester.net
Address: 192.168.10.1

If output messages from your server that's above, Your DNS server is complete.

Label: