As I always have been doing, this article is basically for Ubuntu. I will be using my Ubuntu machine with Ubuntu Lucid Lynx 10.04 Alpha 2 machine.
So here is the article. Enjoy fellas.
1) Install bin9 and dnsutils
apt-get install bind9 dnsutils
2) Configure bind
gksu gedit /etc/bind/named.conf.local
Now add a zone
Example:
zone "Youdomain"{
type master;
file "/etc/bind/zones/yourdomain.db";
};
My ip address is 192.168.0.1 and netmask 255.255.255.0. So in the my domain I use a reverse notation of my network address(192.168.0), 0.168.192 and my configuration file looked like:
zone "0.168.192.in-addr.arpa"{
type master;
file "/etc/bind/zones/0.168.192.in-addr.arpa.db";
};
3) Now you’ll need to point your one level up dns server. Be careful while selecting this. You may like to configure the dns that is regularly updated not like Wlink
To do so you show edit the file named.conf.options and change the forwarder to the dns server your DNS server will point
Quite confusing?
gksu gedit /etc/bind/named.conf.options
And place the code:
forwarders {
# Replace the address below with the address of your provider’s DNS server
208.67.222.222 # I'm using openDNS(My fav) ![]()
};
4) Now make a directory zones in /etc/bind/
gksu mkdir /etc/bind/zones
5) Edit the zone file stated in named.conf.local
gksu gedit /etc/bind/zones/0.168.192.in-addr.arpa.db
My configuration looked like:
// replace 0.168.192.in-addr.arpa with your domain name. do not forget the . after the domain name!
// Also, replace ns1 with the name of your DNS server
0.168.192.in-addr.arpa. IN SOA ns1.0.168.192.in-addr.arpa. admin.0.168.192.in-addr.arpa. (
// Do not modify the following lines!
2007031001
28800
3600
604800
38400
)
// Replace the following line as necessary:
// ns1 = DNS Server name
// mail = mail server name
// 0.168.192.in-addr.arpa = domain name
0.168.192.in-addr.arpa. IN NS ns1.0.168.192.in-addr.arpa.
0.168.192.in-addr.arpa. IN MX 10 mail.0.168.192.in-addr.arpa.
// Replace the IP address with the right IP addresses.
www IN A 192.168.0.1
mta IN A 192.168.0.1
ns1 IN A 192.168.0.1
6) Restart bind.
In the terminal:
sudo /etc/init.d/bind9 restart
7) The final step is to check if the configured dns server is working correctly or not
gksu gedit /etc/resolv.conf
Change the nameserver to your nameserver mine is 192.168.0.1
Now in the terminal type
dig google.com
And check if your dns server was configured correctly or not?
Mine did.
Enjoy fellas.
{ 0 comments }
