4.
DNS Server
Install dns server
apt‐get install bind9
DNS configuration
• vi /etc/bind/named.conf.options
forwarders {
8.8.8.8;
};
• grep ‐A2 'forwarders {' /etc/bind/named.conf.options
• service bind9 restart
Test current DNS Server
• nslookup
root@angelsor:/home/angelsor# nslookup
> server
Default server: 192.168.0.1
Address: 192.168.0.1#53
> gmail.com
Server: 192.168.0.1
Address: 192.168.0.1#53
Non‐authoritative answer:
Name: gmail.com
Address: 74.125.227.181
Name: gmail.com
Address: 74.125.227.182
Adding a new Zone
vi /etc/bind/named.conf.local
zone "loschangos.com" IN {
type master;
file "/etc/bind/db.loschangos.com";
allow‐update { none; };
};
Add db file for new zone
sudo cp /etc/bind/db.local /etc/bind/db.loschangos.com
vi /etc/bind/db.loschangos.com
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA loschangos.com. root.loschangos.com. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS 192.168.0.164.
@ IN A 67.227.226.242
@ IN AAAA ::1
~
DNS Verification
service bind9 restart