Difference between revisions of "DNS Server linux, bind"
From Ilianko
Line 3: | Line 3: | ||
#### | #### | ||
− | + | <code><pre> | |
zone "tugab.bg" | zone "tugab.bg" | ||
{ | { | ||
Line 14: | Line 14: | ||
file "/etc/bind/zones/rev.4.16.172.in-addr.arpa"; | file "/etc/bind/zones/rev.4.16.172.in-addr.arpa"; | ||
}; | }; | ||
+ | </pre></code> | ||
#### | #### | ||
*sudo gedit /etc/bind/named.conf.options | *sudo gedit /etc/bind/named.conf.options | ||
+ | <code><pre> | ||
forwarders { | forwarders { | ||
194.141.15.1; | 194.141.15.1; | ||
}; | }; | ||
+ | </pre></code> | ||
*sudo mkdir /etc/bind/zones | *sudo mkdir /etc/bind/zones |
Revision as of 16:57, 13 August 2011
- sudo apt-get install bind9
- sudo gedit /etc/bind/named.conf.local
zone "tugab.bg"
{
type master;
file "/etc/bind/zones/tugab.bg.db";
};
zone "4.16.172.in-addr.arpa"
{
type master;
file "/etc/bind/zones/rev.4.16.172.in-addr.arpa";
};
- sudo gedit /etc/bind/named.conf.options
forwarders {
194.141.15.1;
};
- sudo mkdir /etc/bind/zones
- sudo gedit /etc/bind/zones/tugab.bg.db
$TTL 60
tugab.bg. IN SOA n1.tugab.bg. admin.tugab.bg. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
tugab.bg. IN NS n1.tugab.bg.
@ IN A 172.16.4.1
n1 IN A 172.16.4.1
www2 IN A 172.16.4.2
sudo gedit rev.4.16.172.in-addr.arpa
$TTL 604800
@ IN SOA n1.tugab.bg. admin.tugab.bg. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
IN NS tugab.bg.
1 IN PTR tugab.bg.
- sudo /etc/init.d/bind9 restart
- sudo vi /etc/resolv.conf
- dig tugab.com /
- nslookup 172.16.0.1