To configure the DNS server, make sure internet sharing was running normally in Winbox (according to the previous post). Perform first update for ubuntu with sudo apt-get update. After that, lets configuring ubuntu server.

1. Setting IP
nano /etc/network/interfaces
 auto eth0  
 iface eth0 inet static  
 address 192.168.100.100  
 netmask 255.255.255.0  
 network 192.168.100.0  
 broadcast 192.168.100.255  
 gateway 192.168.100.1  
 dns-nameservers 192.168.100.100  

2. Setting resolv.conf
nano /etc/resolv.conf
 nameserver 192.168.100.100  

3. Install bind9
apt-get install bind9

4. Setting  named.conf.local
nano /etc/bind/named.conf.local
 zone “raspati.net.id” {  
 type master;  
 file “/etc/bind/raspati.net.id”;  
 };  
 zone “100.168.192.in-addr.arpa” {  
 type master;  
 file “/etc/bind/100.168.192″;  
 };  

5. Copy db.local & db.127
cp /etc/bind/db.local  /etc/bind/raspati.net.id
cp /etc/bind/db.127  /etc/bind/100.168.192

6. Update setting
apt-get update

7. Entry to the directory
cd /etc/bind

8. Configuring raspati.net.id
nano raspati.net.id
 ;  
 ; BIND data file for local loopback interface  
 ;  
 $TTL  604800  
 @  IN SOA raspati.net.id. root.raspati.net.id. (  
        2        ; Serial  
        604800   ; Refresh  
        86400    ; Retry  
        2419200  ; Expire  
        604800 ) ; Negative Cache TTL  
 ;  
@       IN      NS      ns.raspati.net.id.  
ns      IN      A       192.168.100.100  
        IN      MX      10 mail.raspati.net.id.  
mail    IN      A       192.168.100.101  

9. Configuring 100.168.192
nano 100.168.192
 ;  
 ; BIND data file for local loopback interface  
 ;  
 $TTL  604800  
 @  IN SOA raspati.net.id. root.raspati.net.id. (  
        2        ; Serial  
        604800   ; Refresh  
        86400    ; Retry  
        2419200  ; Expire  
        604800 ) ; Negative Cache TTL  
 ;  
 @  IN NS raspati.net.id.  
 100.100.168.192.in-addr.arpa.     IN     PTR     ns.raspati.net.id.  
 101.100.168.192.in-addr.arpa.     IN     PTR     mail.raspati.net.id.  


10. Restart bind9
/etc/init.d/bind9 restart

11. Restart interfaces
/etc/init.d/networking restart

12. Set DNS Server in windows adapter interfaces.

13. Test with nslookup
nslookup ns.raspati.net.id
 Server:      192.168.100.1  
 Address:     192.168.100.1#53  
 
 Name:        ns.raspati.net.id  
 Address:     192.168.100.100  

14. Success!

Post a Comment

 
Top