PDA

View Full Version : Anybody here ever play with BIND? (DNS server)


ThunderPoit
2009-12-30, 14:40
So I am building myself a linux gateway and was playing with setting up a BIND DNS server. Why? Because its fun to torture myself.
I've looked in two different books and as far as I can tell, it looks like it is set up correctly, but I cannot resolve my names.

I have two virtual machines, both running ubuntu server:
gateway: 192.168.118.128
client1: 192.168.118.129

I am trying to set it up using the domain home.local
Ive never done this before and I'm willing to accept that everything I've done is wrong, so here it all is.

My /etc/bind/named.conf.local file:

//
// Do any local configuration here
//

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";

zone "home.local" in {
allow-transfer { any; };
file "/etc/bind/db.home.local";
type master;
};

zone "118.168.192.in-addr.arpa" {
type master;
file "/etc/bind/db.118.168.192";
};


Here is /etc/bind/db.home.local:

$TTL 2D
@ IN SOA gateway.home.local. admin.gateway.home.local. (
09123000 ; serial
3H ; refresh
1H ; retry
1W ; expiry
1D ) ; minimum

home.local IN NS gateway.home.local.
gateway IN A 192.168.118.128
client1 IN A 192.168.118.129
gateway IN CNAME gateway.home.local.
client1 IN CNAME client1.home.local.


And here is /etc/bind/db.118.168.192:

$TTL 2D
@ IN SOA gateway.home.local. admin.gateway.home.local. (
09123000 ; serial
3H ; refresh
1H ; retry
1W ; expiry
1D ) ; minimum

'' IN NS gateway.home.local.
128 IN PTR gateway.home.local.
129 IN PTR client1.home.local.

ThunderPoit
2009-12-30, 16:05
so apparently it really did not like my cname records, i have removed them and now i can resolve gateway.home.local and client1.home.local
i guess i misunderstood how cname works
so there is no way for me to resolve "client1" to 192.168.118.129?

chucker
2009-12-30, 19:58
I think I get what you're trying to do. Try maybe this syntax:

gateway. IN CNAME gateway.home.local.
client1. IN CNAME client1.home.local.

Either way, what you can do, without the CNAME, is to add home.local to the search domains / default suffixes / whichever your client OS calls them.

ThunderPoit
2009-12-30, 20:26
nope, that didn't seem to work either

ThunderPoit
2009-12-30, 20:43
*facepalm*
chasing my tail for something so damn obvious
/etc/resolv.conf
holds dns server info and search domain info
once i configured it to have my domain ahead of comcast's, everything worked fine.
now to make BIND talk nicely with my DHCP server...

ThunderPoit
2010-01-02, 20:05
WHEEEEEEEEEE!
IT WORKS!
IT WORKS!
The caps filter got me, didn't it....
But it works!
I have my DHCP server fully running!
I have my BIND server fully running!
And they talk to each other!
I just plugged my laptop into the NIC (named "thebook"), tailed the syslog, and watched as the DHCP server updated the BIND journal files with the hostname and IP address!
I'm guessing this makes little sense to anyone else, but I'm just so damn happy it works!