Build DNS server on ubuntu linux
DNS (Domain Name Server) is server who provide translating ip address to name whos understandable or human readable, example 69.43.67.127 is for yahoo.com
hope this article help you
Step by step
- set ip address nic
- install bind package
- config bind server
1. set nic ipaddress
let say you have ip 10.10.10.254/24 eth0 execute this command on your terminal
"ip addr add 10.10.10.254/24 dev eth0"
you can make it permanent when you fill above script to rc.local file
2. install bind package
execute "apt-get install bind9"
3. config bind server
let say you want translate 10.10.10.254 to zoepha.co.cc edit file named.conf on /etc/bind folder put this on the bottom of file zone "zoepha.co.cc" { type master; file "zoepha.co.cc.hosts"; }; zone "10.10.10.in-addr.arpa" { type master; file "10.10.10.254.rev"; }; create file "10.10.10.254.ref" on /etc/bind folder, and fill this $ttl 38400 @ IN SOA tanahbaru.zoepha.co.cc. root@zoepha.co.cc. ( 1147923681 10800 3600 604800 38400 ) @ IN NS tanahbaru.zoepha.co.cc. 254 IN PTR http://www.zoepha.co.cc. 200 IN PTR mail.zoepha.co.cc. create file "zoepha.co.cc.hosts" on /etc/bind folder, and fill this $ttl 38400 @ IN SOA tanahbaru.zoepha.co.cc. root@zoepha.co.cc. ( 1147923546 10800 3600 604800 38400 ) @ IN NS tanahbaru.zoepha.co.cc. IN MX 10 tanahbaru.zoepha.co.cc. @ IN A 10.10.10.254 tanahbaru IN A 10.10.10.254 pos IN A 10.10.10.200 www IN CNAME tanahbaru.zoepha.co.cc. mail IN CNAME pos.zoepha.co.cc. edit your "resolv.conf" file on /etc folder, for tell your linux to user internal name server nameserver 10.10.10.254 restart your bind server with this command /etc/init.d/bind9 restart
that's it, you have dns server who translate 10.10.10.254 to zoepha.co.cc, you can test it on console with this command "nslookup zoepha.co.cc"
i dont create the image, i got from dreamstime.com