Linux Dns Server Expose
Linux Dns Server Expose
1. Network Information
In this expose, we are going to setup a local DNS
server for the network shown in the below
diagram.
forwarders {
8.8.8.8;
8.8.4.4;
};
$ dig ubuntu.com
$ dig ubuntu.com
;; Query time: 3 msec
zone "Zidane.local" {
type master;
file "/etc/bind/db.zidane.local";
};
zone "0.16.172.in-addr.arpa" {
type master;
notify no;
file "/etc/bind/db.10";
};
$ sudo cp /etc/bind/db.local
/etc/bind/db.zidane.local
$TTL 604800
1024 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
@ IN NS ns.zidane.local.
Zidane.local. IN MX 10
mail.zidane.local.
ns IN A 10.42.0.83
web IN A 10.42.0.80
mail IN A 10.42.0.70
$TTL 604800
@ IN SOA ns.zidane.local. root.localhost. (
20 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
@ IN NS ns.
$TTL 604800
20 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
@ IN NS ns.
83 IN PTR ns.zidane.local.
70 IN PTR mail.zidane.local.net.
80 IN PTR web.zidane.local.net.
nameserver 172.16.0.15
$ ping mail.zidane.local