How To Setup A Dns Server On Ubuntu 12.04

This tutorial volition deal yous inwards setting upwards a dns gateway inwards your ubuntu motorcar (I'm using 12.04 version, non certain if this would operate on others).

First nosotros require to install bind9, which is a dns server:

sudo apt-get install bind9 

Open /etc/bind/named.conf.local in addition to supersede with:

acl internal {  10.0.0.0/8;  localhost; };  sentiment "internal-view" {  match-clients { internal; };  include "/etc/bind/named.conf.default-zones";   zone "ipiel.net" {   type master;   file "/etc/bind/zones/db.ipiel.net";  };  };  sentiment "external-view" {  match-clients { any; };  include "/etc/bind/named.conf.default-zones"; }; 
Then exercise a file: /etc/bind/zones/db.ipiel.net, alongside the next contents:
$TTL 300 @ IN SOA ipiel.net. hostmaster.ipiel.net. (    2012091800 ; Serial    10800   ; Refresh    3600  ; Retry    604800  ; Expire    300 )  ; Negative Cache TTL  $ORIGIN @    NS      ns1.ipiel.net.    Influenza A virus subtype H5N1 10.1.1.69 ns1   Influenza A virus subtype H5N1 10.1.1.55                 IN      MX  10  mail.ipiel.net.  www  IN Influenza A virus subtype H5N1 10.1.1.69 po1  IN Influenza A virus subtype H5N1 10.1.1.69 db1  IN Influenza A virus subtype H5N1 10.1.1.55 gw1  IN Influenza A virus subtype H5N1 10.1.1.55 gw   CNAME gw1 po   CNAME po1 db   CNAME db1 

The settings agency that I convey three servers:
1.) portal - po1, po
2.) gateways - gw1, gw
3.) database - db1, db

These settings are useful when yous convey a customer (mobile app or or in addition to hence other spider web application on or in addition to hence other machine) in addition to yous don't desire to alter the IP setting. Because inwards mobile that agency rebuild in addition to redeploy. When yous convey these settings all yous require to exercise is alter your dns setting to 10.1.1.55, or the motorcar ip where yous install  and configured bind9.

Finally edit, /etc/bin/named.conf in addition to comment this line:
include "/etc/bind/named.conf.default-zones"; 

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

In or in addition to hence other motorcar all yous require to exercise to alter your dns server is to edit /etc/resolv.conf in addition to add together
nameserver 10.1.1.55 
Next
Previous
Click here for Comments

0 komentar:

Please comment if there are any that need to be asked.