Answer the question
In order to leave comments, you need to log in
Own DNS server
Comrades, help!
Condition: ubuntu server, bind9, static ip (via pppoe), domain (example.com, primer.ru)
Task: dns-server. So that when registering a new domain, you can specify ns1.example.com, ns2.example.com and everything works.
What I have:
zone "example.com" {
type master;
file "/etc/bind/sites/example.com";
};
zone "primer.ru" {
type master;
file "/etc/bind/sites/primer.ru";
};
$ORIGIN .
$TTL 86400 ; 1 day
example.com IN SOA ns1.example.com. root.example.com. (
2012121900 ; serial
3600 ; refresh (1 hour)
1200 ; retry (20 minutes)
1209600 ; expire (2 weeks)
86400 ; minimum (1 day)
)
NS ns1.example.com.
NS ns2.example.com.
A мой_статический_ип
$ORIGIN example.com.
ns1 A мой_статический_ип
ns2 A мой_статический_ип2
$ORIGIN .
$TTL 86400 ; 1 day
primer.ru IN SOA ns1.example.com. root.example.com. (
2012121900 ; serial
3600 ; refresh (1 hour)
1200 ; retry (20 minutes)
1209600 ; expire (2 weeks)
86400 ; minimum (1 day)
)
NS ns1.example.com.
NS ns2.example.com.
A мой_статический_ип
$ORIGIN primer.ru.
ns1 A мой_статический_ип
ns2 A мой_статический_ип2
Answer the question
In order to leave comments, you need to log in
Why is the ORIGIN variable defined 2 times? Why is the domain name not in the FQDN form (without the trailing dot) in the SOA record?
Do you need a slave server?Yes, a slave server is always needed if you want fault tolerance - ns's are geographically and logically separated servers.
Do I need to change anything in named.conf.options?Yes. On the master server, change the zone by adding this:
Keeping both ns1 and ns2 on the same piece of hardware is fraught with the fact that if the server falls, then everything that is tied to these dns (mail, sites that are not hosted by other pieces of iron) will automatically become inaccessible too. Better 2 different pieces of iron. And even better and dts are different (:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question