Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Dec 10, 2007 6:43 pm 
Offline
Junior Member

Joined: Tue Dec 04, 2007 12:51 am
Posts: 22
It's better to have your own DNS server as SOA for your zones and set the Linode DNS servers as slaves, so that whenever you make a change to a zone file (and increment the serial # field of the SOA) the slave servers automatically get notified and fetch the updated zone.

1. configure an ACL at the top of your /etc/bind/named.conf
Code:
acl slaves {
        69.93.127.10;
        65.19.178.10;
};


2. For each zone that you want to use Linode as slaves, add to /etc/bind/named.conf:
Code:
        notify yes;
        allow-transfer {
                slaves;
        };


so, a complete zone entry will look like this:

Code:
zone "intuitivenipple.net" {
        type master;
        file "/etc/bind/intuitivenipple.net.hosts";
        notify yes;
        allow-transfer {
                slaves;
        };
};


3. Add the domain-name as a Slave to Linode DNS manager, and put your DNS server's IP address in the Masters field.

4. Make sure your firewall allows inbound/outbound TCP on port 53, possibly restricted to those Linode DNS server IP addresses in the ACL.

5. In each zone file ensure the Linode servers are listed as NS, so, in addition to your own DNS server's NS entry, add:
Code:
@               IN      NS      dns1.intuitivenipple.net.
@               IN      NS      dns2.intuitivenipple.net.
dns1            IN      A       69.93.127.10
dns2            IN      A       65.19.178.10

obviously, change the names to match your domain, or else use the linode.com names and don't use A records:
Code:
@               IN      NS     ns1.linode.com.
@               IN      NS     ns2.linode.com.


6. At the registry for the domain, add the 2 slave servers to the list of NS servers

_________________
TJ.
IntuitiveNipple

The only intuitive interface is the nipple; everything else is learned.


Top
   
PostPosted: Tue Dec 11, 2007 12:43 pm 
Offline
Senior Member

Joined: Sun Nov 30, 2003 2:28 pm
Posts: 245
IntuititveNipple wrote:
It's better to have your own DNS server as SOA for your zones and set the Linode DNS servers as slaves,


Why?

I run my own mail server, because there are policy issues that I really don't want anyone else making decisions about. OTOH, DNS either works or it doesn't, and unless you are managing a large zone, or have some pretty special requirements, I really don't see the value of running your own DNS server. BIND in particular is a big beast, easy to break, and running it to support 3 entries seems like overkill to me.

_________________
The irony is that Bill Gates claims to be making a stable operating system and Linus Torvalds claims to be trying to take over the world.
-- seen on the net


Top
   
PostPosted: Tue Dec 11, 2007 4:00 pm 
Offline
Junior Member

Joined: Tue Dec 04, 2007 12:51 am
Posts: 22
SteveG wrote:
IntuititveNipple wrote:
It's better to have your own DNS server as SOA for your zones and set the Linode DNS servers as slaves,

Why?

Especially when using automated management tools such as Webmin, VirtualMin, UserMin, Plesk, CPanel etc., this configuration ensures that any changes to the DNS zones are automatically reflected in all the DNS servers and that domain DNS is resilient to temporary interruptions.

If the server is being used to host more than a trivial number of personal domains, and especially if the operator offers hosting to others, it keeps management of the domains simple and ensures things don't get out of step.

_________________
TJ.
IntuitiveNipple


The only intuitive interface is the nipple; everything else is learned.


Top
   
 Post subject:
PostPosted: Tue Dec 11, 2007 7:08 pm 
Offline
Senior Member

Joined: Sun Nov 30, 2003 2:28 pm
Posts: 245
Ah, I think I misread your original post. I thought you were asserting a general statement that running one's own DNS server was "better". Instead, I think you were asserting that if you need to run your own DNS server, setting up automatic updates of the secondaries via the slaves system is a Good Thing, which I'd agree with completely.

_________________
The irony is that Bill Gates claims to be making a stable operating system and Linus Torvalds claims to be trying to take over the world.

-- seen on the net


Top
   
 Post subject:
PostPosted: Wed Mar 05, 2008 5:17 pm 
Offline

Joined: Tue Mar 04, 2008 5:53 pm
Posts: 1
Where did you get the IPs 69.93.127.10 and 65.19.178.10? When I was poking around trying to use Linode as a secondary DNS service, I got a host starting 68. that had a PTR to webhost.linode.com, but there was no corresponding A record. I've tried all 3, but when I query the servers looking for my slave records, I get NXDOMAIN.


Top
   
 Post subject:
PostPosted: Wed Mar 05, 2008 5:39 pm 
Offline
Junior Member

Joined: Tue Dec 04, 2007 12:51 am
Posts: 22
redboy wrote:
Where did you get the IPs 69.93.127.10 and 65.19.178.10?

They are the IP addresses of ns1.linode.com and ns2.linode.com. If you want to have the hostnames of the nameservers use the same domain-name as your domain then you need the A records as I showed (dns1 and dns2).

If you're okay with your domain reporting the NS records as the linode hostnames then just use the second example I gave.

_________________
TJ.
IntuitiveNipple


The only intuitive interface is the nipple; everything else is learned.


Top
   
 Post subject:
PostPosted: Thu Jun 19, 2008 6:06 pm 
Offline
Senior Newbie

Joined: Thu Jun 19, 2008 2:28 pm
Posts: 9
Great tip, IntuititveNipple. I just got this going and it seems to be working well so far. Thanks for posting it!

The one thing I did notice that bothers me a bit is that anyone is allowed to do a zone transfer of any zone from the linode.com DNS servers. I found this thread in which this was brought up a while back, but it still looks like an issue. If any admins are reading, is this something you guys are still planning on fixing in the future?


Top
   
 Post subject:
PostPosted: Thu Jun 19, 2008 6:27 pm 
Offline
Senior Member

Joined: Sun Nov 30, 2003 2:28 pm
Posts: 245
tonycpsu wrote:
The one thing I did notice that bothers me a bit is that anyone is allowed to do a zone transfer of any zone from the linode.com DNS servers.


So? It's public information. That's why it's in the DNS. If you don't want people to find your hosts, don't put them in the system.

_________________
The irony is that Bill Gates claims to be making a stable operating system and Linus Torvalds claims to be trying to take over the world.

-- seen on the net


Top
   
 Post subject:
PostPosted: Thu Jun 19, 2008 6:42 pm 
Offline
Senior Newbie

Joined: Thu Jun 19, 2008 2:28 pm
Posts: 9
Of course it's public information, but just because you allow people inside an art museum doesn't mean you should furnish them with building plans showing all of the entrances.

Attackers go for the easiest targets. Having a lax policy toward zone transfers is a sign of lax security, even if it's a reasonably small amount of actual exposure.

Not to mention, think of all the wasted bandwidth and CPU resources on the DNS servers as they fulfill transfer requests for no good reason...

It's not the biggest deal in the world, but I'd definitely put it on the list of things to fix in the future if I was running things.


Top
   
 Post subject:
PostPosted: Thu Jun 19, 2008 6:52 pm 
Offline
Senior Member

Joined: Sun Nov 30, 2003 2:28 pm
Posts: 245
tonycpsu wrote:
Of course it's public information, but just because you allow people inside an art museum doesn't mean you should furnish them with building plans showing all of the entrances.


Because, of course, it's impossible for the attacker to find them otherwise. If releasing the building plan affects your museum security, then your security is flawed.

tonycpsu wrote:
Not to mention, think of all the wasted bandwidth and CPU resources on the DNS servers as they fulfill transfer requests for no good reason...


That *is* a good reason to disallow zone transfers, but that's caker's problem (and choice).

_________________
The irony is that Bill Gates claims to be making a stable operating system and Linus Torvalds claims to be trying to take over the world.

-- seen on the net


Top
   
 Post subject:
PostPosted: Fri Jun 20, 2008 12:11 am 
Offline
Senior Newbie

Joined: Thu Jun 19, 2008 2:28 pm
Posts: 9
SteveG wrote:
Because, of course, it's impossible for the attacker to find them otherwise. If releasing the building plan affects your museum security, then your security is flawed.


Again, my points were (1) there's no need to make it *easy* for them, and (2) a seemingly innocuous oversight like this is a sign that there may be bigger vulnerabilities elsewhere. But, whatever, you disagree.

SteveG wrote:
That *is* a good reason to disallow zone transfers, but that's caker's problem (and choice).


I wasn't aware it was a conscious choice rather than an oversight, or maybe something that might have fallen to the bottom of the stack. Just throwin' it out there...


Top
   
 Post subject:
PostPosted: Sat Jun 21, 2008 7:47 am 
Offline
Junior Member

Joined: Tue Dec 04, 2007 12:51 am
Posts: 22
Best practice for non-authoritative DNS servers (such as the Linode servers) is that they should not allow unrestricted zone transfers.

Amongst varied reasons is that the zone file when seen in total can give clues as to the domain's organisation and structure, possibly making it easier for an attacker to deduce and exploit 'psuedo-private' servers or services.

See also Sans Institute "Why is securing DNS zone transfer necessary ?"

I've opened a support ticket and will report back on what Chris thinks.

_________________
TJ.
IntuitiveNipple


The only intuitive interface is the nipple; everything else is learned.


Top
   
 Post subject:
PostPosted: Mon Jun 23, 2008 2:25 pm 
Offline
Junior Member

Joined: Tue Dec 04, 2007 12:51 am
Posts: 22
'Tasaro' responded to the support ticket:
Quote:
This is in our queue - we're not sure on an ETA at this time.

_________________
TJ.
IntuitiveNipple


The only intuitive interface is the nipple; everything else is learned.


Top
   
 Post subject:
PostPosted: Mon Jun 23, 2008 6:10 pm 
Offline
Senior Newbie

Joined: Thu Jun 19, 2008 2:28 pm
Posts: 9
IntuitiveNipple:

Thanks for the response, I appreciate it. As long as they know about the problem, I'm happy.


Top
   
PostPosted: Tue Jul 15, 2008 6:22 pm 
Offline
Senior Newbie

Joined: Tue Jul 15, 2008 6:11 pm
Posts: 19
SteveG wrote:
BIND in particular is a big beast, easy to break, and running it to support 3 entries seems like overkill to me.


maradns is tiny and does the same ;-)

I am yet to configure it on linode, but I used maradns for years on some 96MB RAM VPS. It takes a few kB of RAM and here is my whole configuration:

=== /etc/maradns/mararc ===

ipv4_bind_addresses = "1.2.3.4,127.0.0.1"
# replace 1.2.3.4 with machine IP

chroot_dir = "/etc/maradns"
csv2 = {}
csv2["my.domain.name."] = "db.my.domain.name"
# replace my.domain.name with true domain name

# Allow hosts below to transfer
recursive_acl = "11.12.13.14,21.22.23.24"
zone_transfer_acl = "11.12.13.14,21.22.23.24"

hide_disclaimer = "YES"

# Suit to "id maradns"
maradns_uid=108
maradns_gid=114

=== /etc/maradns/db.my.domain.name ====

my.domain.name. 1.2.3.4
www.my.domain.name. 1.2.3.4
mail.my.domain.name. 1.2.3.4
my.domain.name. MX 10 mail.my.domain.name.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group