Please help us improve HowtoForge and take our survey:
Installing An Ubuntu Hardy 8.04 LTS DNS Server With BIND - Page 4
10 Install the DNS ServerRun apt-get install bind9 For security reasons we want to run BIND chrooted so we have to do the following steps: /etc/init.d/bind9 stop Edit the file /etc/default/bind9 so that the daemon will run as the unprivileged user bind, chrooted to /var/lib/named. Modify the line: OPTIONS="-u bind" so that it reads OPTIONS="-u bind -t /var/lib/named": vi /etc/default/bind9
Create the necessary directories under /var/lib: mkdir -p /var/lib/named/etc Then move the config directory from /etc to /var/lib/named/etc: mv /etc/bind /var/lib/named/etc Create a symlink to the new config directory from the old location (to avoid problems when bind gets updated in the future): ln -s /var/lib/named/etc/bind /etc/bind Make null and random devices, and fix permissions of the directories: mknod /var/lib/named/dev/null c 1 3 We need to modify /etc/default/syslogd so that we can still get important messages logged to the system logs. Modify the line: SYSLOGD="" so that it reads: SYSLOGD="-a /var/lib/named/dev/log": vi /etc/default/syslogd
Restart the logging daemon: /etc/init.d/sysklogd restart Start up BIND, and check /var/log/syslog for errors: /etc/init.d/bind9 start
11 Configure BINDNow the main configuration file in BIND is named.conf, however named.conf.local is already included in named.conf and its there for customized configuration, so we will edit named.conf.local and we will add our zones, here I added a zone camed tm.local as well as a reverse zone for 192.168.0.0: vi /etc/bind/named.conf.local
Please note that if you want to add a comment in named.conf or named.conf.local use //, also you can see above the zone file for tm.local is called tm.local.db and is located in /etc/bind/zone, the most important thing that the zone file uses ; as the prefix for a comment and not //, as I saw confusions in a lot of forums so I thought to add it here - (same for the reverse zone).
12 Configure the ZonesWe will start with the zone tm.localmkdir /etc/bind/zones vi /etc/bind/zones/tm.local.db
Feel free to replace the above zone name (tm.local) or your dns server name (server1) as needed, just note the . DOT after the zone name. Now let's go ahead with the reverse zone. vi /etc/bind/zones/rev.3.13.10.in-addr.arpa
Now configure the server to forward any requests to your ISP server so it case resolve external IPs. vi /etc/bind/named.conf.options Uncomment the forwarder section to look like this:
13 Configure the server to use itself as DNSvi /etc/resolv.conf
14 References and Sources
|






print: 
Recent comments
12 hours 53 min ago
1 day 5 hours ago
1 day 5 hours ago
2 days 51 min ago
2 days 21 hours ago
2 days 23 hours ago
3 days 3 hours ago
4 days 20 hours ago
4 days 20 hours ago
4 days 21 hours ago