[TriLUG] Help with caching dns server

Peter Long triluglist at petelong.com
Wed Sep 17 10:10:38 EDT 2008


Are you sure you are using  your new DNS rather than OpenDNS? What does your
/etc/resolv.conf have in it on the machine you are pinging from? Perhaps it
is not looking up www as www.home.linux, but rather attaching your
dyndns.com domain suffix. There should be something like:

search home.linux
nameserver 192.168.0.1
domain home.linux

in the /etc/resolv.conf.

Just a guess.

Peter Long



On Tue, Sep 16, 2008 at 9:48 PM, Roy Vestal <rvestal at trilug.org> wrote:

> OK...tried that...something broke. When i ping www or any of the
> "websites", the ip assigned me from dyndns.com is returned, not
> 192.168.0.1.
>
> In my /etc/named.conf:
> <snip>
> zone "home.linux" {
> type master;
> file "home.linux.zone";
> };
> </snip>
>
> In my home.linux.zone file:
>
> $TTL 900
> @ IN SOA ns.mydomain.local. my.email.address. (
> 200809160 ; serial, todays date + todays serial #
> 8H ; refresh, seconds
> 2H ; retry, seconds
> 4W ; expire, seconds
> 900 ) ; minimum, seconds
> ;
> NS ns ; Inet Address of name server
>
>
> @ IN A 127.0.0.1
> ns IN A 192.168.0.1
> www IN A 192.168.0.1
> royvestal.homelinux.org IN A 192.168.0.1
> lmr.gotdns.com IN A 192.168.0.1
> rpp.linuxmaniac.net IN A 192.168.0.1
>
>
> Aaron Joyner wrote:
> > The easiest way to do this (with a traditional DNS server, not
> > counting dnsmasq, which I know basically nothing about) is to install
> > your distributions 'bind9' or 'caching-dns' server package, and point
> > your local workstations at it's IP address.  That'll get you 90% of
> > the way there.  For the remainder, you'll need to pick a local domain
> > to use.  It *could* be something externally resolvable, but not
> > messing up the external resolution of that domain name is beyond the
> > scope of this email.  You then simply need to edit /etc/named.conf (or
> > where ever your distribution has the named.conf file, consult your
> > package manager), and add a zone entry:
> >
> > zone "mydomain.local" {
> >   type master;
> >   file "db.mydomain.local";
> > }
> >
> > Then you'll need to create a local zone file for mydomain.local.  It
> > should be created in what ever directory the "options" section of the
> > named.conf defines with the "directory" keyword.  The zone file should
> > have contents similar to this:
> > $TTL 900
> > @       IN      SOA     ns.mydomain.local. my.email.address. (
> >                         200809160 ; serial, todays date + todays serial #
> >                         8H    ; refresh, seconds
> >                         2H    ; retry, seconds
> >                         4W    ; expire, seconds
> >                         900 )   ; minimum, seconds
> > ;
> >                 NS      ns    ; Inet Address of name server
> >
> > ns      A  1.1.1.1
> > www     A  1.1.1.1
> > laptop1 A  1.1.1.2
> > laptop2 A  1.1.1.3
> >
> > Then at your local shell prompt as root, 'rndc reload'.
> > Congratulations, you're now a DNS administrator!
> >
> > Aaron S. Joyner
> >
> >
> > On Tue, Sep 16, 2008 at 1:54 PM, Roy Vestal <rvestal at trilug.org> wrote:
> >
> >> We have a few machines at the house (a desktop, 2 laptops, etc) that I
> >> want to use a local dns server vs the time-warner dns server. I was
> >> hoping to add to it, the local IP's of the web server and then add cname
> >> (or something similar) to the dns server so that when the machines
> >> grabbed dhcp, the dns would supply those so I *wouldn't* have to update
> >> /etc/hosts everytime.
> >>
> >> :)
> >>
> >> Aaron Joyner wrote:
> >>
> >>> If you want to use the local IP for local resolution... /etc/hosts is
> your
> >>> friend.  If you've got something more complicated in mind, please
> provide
> >>> more details.
> >>>
> >>> Aaron S. Joyner
> >>>
> >>>
> >>> On Mon, Sep 15, 2008 at 4:37 PM, Roy Vestal <rvestal at trilug.org>
> wrote:
> >>>
> >>>
> >>>
> >>>> Hey guys. I'm trying to figure out how to add the local IP address of
> my
> >>>> webserver to the dns server i just built. I'm using centos 5. The DNS
> >>>> server works fine for external entries.
> >>>>
> >>>> My webserver hosts mutliple virtual dirs with apache.
> >>>>
> >>>> TIA
> >>>> --
> >>>> TriLUG mailing list        :
> http://www.trilug.org/mailman/listinfo/trilug
> >>>> TriLUG FAQ  : http://www.trilug.org/wiki/Frequently_Asked_Questions
> >>>>
> >>>>
> >>>>
> >> --
> >> TriLUG mailing list        :
> http://www.trilug.org/mailman/listinfo/trilug
> >> TriLUG FAQ  : http://www.trilug.org/wiki/Frequently_Asked_Questio
> >>
> --
> TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG FAQ  : http://www.trilug.org/wiki/Frequently_Asked_Questions
>



More information about the TriLUG mailing list