Académique Documents
Professionnel Documents
Culture Documents
After I needed a DNS server DNS server, I decided the best idea would probably be to write this
howto myself…. So, here it is:
Step 2: Configure the main Bind files. Usually, if you install Bind from the source code, you will
have to edit the file
named.conf. However, Debian provides you with a pre-configured Bind, so we will edit another
file:
nano /etc/bind/named.conf.local
This is where we will insert our zones. By the way, a zone is a domain name that is referenced
in the DNS server
Insert this in the named.conf.local file:
# Replace 2.4.168.192 with your network address in reverse notation – in this example my
network address is 192.168.4.2
zone “2.4.168.192.in-addr.arpa” {
type master;
file “/etc/bind/zones/rev.2.4.168.192.in-addr.arpa”;
};
nano /etc/bind/named.conf.options
We need to modify the forwarder. This is the DNS server to which your own DNS will forward
the requests he cannot process.
# Replace the address below with the address of your provider’s DNS server
forwarders {
192.168.4.3;
};
Step 4. Now we will add the zone definition files:
mkdir -p /etc/bind/zones
nano /etc/bind/zones/debian-tutorials.com.db
The zone definition file is where we will put all the addresses that our DNS server will know.
You can take the following example:
debian-tutorials.com. IN SOA ns1.debian-tutorials.com. admin.debian-tutorials.com. (
#Do NOT modify the following lines!
2006081401
28800
3600
604800
38400
)
#Edit the following line as necessary:
debian-tutorials.com. IN NS ns1.debian-tutorials.com.
debian-tutorials.com. IN MX 10 mta.debian-tutorials.com.
vim /etc/bind/zones/rev.2.4.168.192.in-addr.arpa
Copy/paste the following text and modify as needed:
IN NS ns1.debian-tutorials.com.
1 IN PTR debian-tutorials.com
Enjoy this. And don’t forget to comment if something it’s wrong or you want to improve it.