Linux dns
From John Freier
Revision as of 13:52, 10 September 2015 by Jfreier (Talk | contribs) (Created page with "DNS are the servers that translate domain names to IP addresses. == Setup - Ubuntu == It seems the default application for DNS is bind or bind9. Install it: sudo apt-ge...")
DNS are the servers that translate domain names to IP addresses.
Setup - Ubuntu
It seems the default application for DNS is bind or bind9.
Install it:
sudo apt-get intstall bind9
Stop/Start/Restart
sudo services bind9 restart
Setup your own naming
You need to create a zone file. This tells the DNS what to do.
1. Create the initialize of the zone file.
sudo vi named.conf.local
2. Add your own full qualified name to the file.
the zone is the name, file points to the config file for this name.
zone "example.com" { type master; file "/etc/bind/db.example.com"; }
3. Create the config file.
Create the config file by using the empty scaffolding file bind gives you.
sudo cp db.empty db.example.com
4. Edit the new file
; ; BIND data file for local loopback interface ; $TTL 604800 @ IN SOA example.com. root.example.com. ( 5 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ) ; Negative Cache TTL ; IN A 192.168.1.1 @ IN NS localhost. www IN CNAME example.com.