DNS and Bind Presenter David Wood 01-12-2013
DNS What is DNS and Why do we care DNS history Client side stuff Problems with DNS Why Bind and what other options Some key words for DNS BIND Files Named.conf Db files Conclusion
What is DNS and Why do we care Domain Name Service Hostnames and IP addresses Www.google.com -> 173.194.75.147 13 Root dns servers world wide
DNS History DNS was first made in 1982 Arpanet made DNS DNS in the Enterprise
Client Side Stuff /etc/resolv.conf Domain example.com Search example.com Nameserver 192.168.1.1 prefer Nslookup www.google.com Dig www.google.com Dig -t MX gmail.com
Problems with DNS Round Robin DNS Outage Master outage DNS Redundancy
Why Bind and what other types Bind is the leading DNS server across the world 9 out of 13 Root servers prefer Bind Features of Bind Tsig Views Other DNS versions Microsoft Lbnamed Ldap nis
Types of DNS Caching-only Forward Master Slave
Some key words for DNS Record types A Www.google.com Is where? CNAME Www.yahoo.com Isnt the real name? PTR I know the IP but whats the hostname MX Mail servers NS Other DNS servers
Bind files to know /etc/named/named.conf /var/named/db.*
Named.conf options { directory "/var/named"; version "get lost"; allow-transfer {"none";}; allow-recursion {192.168.3.0/24;}; }; logging{ channel example_log{ file "/var/log/named/example.log" versions 3 size 2m; severity info; print-severity yes; print-time yes; print-category yes; category default{ example_log;
Named.conf cont. // required zone for recursive queries zone "." { type hint; file "root.servers";}; zone "example.com" in{ type master; file "master/db.master.example.com"; Allow-transfer {192.168.23.1;192.168.23.2;); }; zone "localhost" in{ file "master.localhost"; allow-update{none;}; }; zone "0.168.192.IN-ADDR.ARPA" in{ file "db.192.168.0.rev"; };
db.example.com example $TTL 86400 ; 24 hours could have been written as 24h or 1d $ORIGIN example.com. @ 1D IN SOA ns1.example.com. hostmaster.example.com. ( 2002022401 ; serial 3H ; refresh 15 ; retry 1w ; expire 3h ; minimum ) IN NS ns1.example.com. ; in the domain IN MX 10 mail.another.com. ; external mail provider ns1 IN A 192.168.0.1 ;name server definition www IN A 192.168.0.2 ;web server definition ftp IN CNAME www.example.com. ;ftp server definition www IN A 192.168.0.3 fred IN A 192.168.0.4
Conclusion Running DNS at home Running DNS for your own website Running DNS at work
If there is time - Security Split-zone DNS Views Chroot Dont run as root Flags for named -t – chroot the service -u – Run as a different user -c – location to config file within chroot environment