Hey John,

        Been there, done that!  Here is what I did!  What I did was to make my
computer a full blown DNS server for the internet as well as the local
ampr.org.  To do this, you must be connected to the internet at the time
that you want to do any name resolving.

        Attention flamers!  I am showing John how to make his DNS work with
internet names as well as ampr.org names.  That should be sufficient to call
this a "Ham" subject.  If anyone disagrees, then I humbly apologize.


Here is my named.conf.  Keep in mind that ihs.com is my local network:
------------------------------cut
here----------------------------------------
/*
 * A simple BIND 8 configuration
 */

options {
        directory "/var/named";
 multiple-cnames yes;
};

logging {
        category lame-servers { null; };
        category cname { null; };
};

zone "ihs.com" in {
        type master;
        file "ihs.com";
};

zone "ampr.org" in {
        type master;
        file "ampr.org";
};
zone "0.10.in-addr.arpa" in {
        type master;
        file "10.0";
};

zone "." in {
        type hint;
        file "root.hints";
};

zone "0.0.127.in-addr.arpa" in {
        type master;
        file "127.0.0";
};


------------------------------cut
here----------------------------------------

Notice that there is a zone called "." with the file name root.hints.  This
file tells named where to get information on internet names outside of
domains that we have defined locally, namely ihs.com and ampr.org.  my
root.hints file is as follows:

------------------------------cut
here----------------------------------------

.                       5d17h34m3s IN NS  K.ROOT-SERVERS.NET.
.                       5d17h34m3s IN NS  J.ROOT-SERVERS.NET.
.                       5d17h34m3s IN NS  G.ROOT-SERVERS.NET.
.                       5d17h34m3s IN NS  F.ROOT-SERVERS.NET.
.                       5d17h34m3s IN NS  I.ROOT-SERVERS.NET.
.                       5d17h34m3s IN NS  E.ROOT-SERVERS.NET.
.                       5d17h34m3s IN NS  D.ROOT-SERVERS.NET.
.                       5d17h34m3s IN NS  C.ROOT-SERVERS.NET.
.                       5d17h34m3s IN NS  B.ROOT-SERVERS.NET.
.                       5d17h34m3s IN NS  H.ROOT-SERVERS.NET.
.                       5d17h34m3s IN NS  A.ROOT-SERVERS.NET.
.                       5d17h34m3s IN NS  M.ROOT-SERVERS.NET.
.                       5d17h34m3s IN NS  L.ROOT-SERVERS.NET.
K.ROOT-SERVERS.NET.     5w6d16h IN A    193.0.14.129
J.ROOT-SERVERS.NET.     5w6d16h IN A    198.41.0.10
G.ROOT-SERVERS.NET.     5w6d16h IN A    192.112.36.4
F.ROOT-SERVERS.NET.     5w6d16h IN A    192.5.5.241
I.ROOT-SERVERS.NET.     5w6d16h IN A    192.36.148.17
E.ROOT-SERVERS.NET.     5w6d16h IN A    192.203.230.10
D.ROOT-SERVERS.NET.     5w6d16h IN A    128.8.10.90
C.ROOT-SERVERS.NET.     5w6d16h IN A    192.33.4.12
B.ROOT-SERVERS.NET.     5w6d16h IN A    128.9.0.107
H.ROOT-SERVERS.NET.     5w6d16h IN A    128.63.2.53
A.ROOT-SERVERS.NET.     5w6d16h IN A    198.41.0.4
M.ROOT-SERVERS.NET.     5w6d16h IN A    202.12.27.33
L.ROOT-SERVERS.NET.     5w6d16h IN A    198.32.64.12


------------------------------cut
here----------------------------------------


This file is dynamic and I generate it once a month by running a utility
called dig.  The following script runs once a month from my crontab:


------------------------------cut
here----------------------------------------

#!/bin/sh
#
# Update the nameserver cache information file once per month.
# This is run automatically by a cron entry.
#
# Original by Al Longyear
# Updated for bind 8 by Nicolai Langfeldt
# SERVFAIL problem discovered by David A. Ranch
#
(
   echo "To: jim <jim>"
   echo "From: system <root>"
   echo "Subject: Automatic update of the named.conf file"
   echo

   export PATH=/sbin:/usr/sbin:/bin:/usr/bin:
   cd /var/named

   dig @rs.internic.net . ns >root.hints.new

   case `cat root.hints.new` in
     *SERVFAIL*)
          echo "The named.conf file update has FAILED."
         echo "This is the error that DIG reported:"
          echo
          cat root.hints.new
          exit 0
   esac

   echo "The named.conf file has been updated to contain the following
  information:"
   echo
   cat root.hints.new

   chown root.root root.hints.new
   chmod 444 root.hints.new
   rm -f root.hints.old
   mv root.hints root.hints.old
   mv root.hints.new root.hints
   ndc restart
   echo
   echo "The nameserver has been restarted to ensure that the update is
complete
   echo "The previous root.hints file is now called
  /var/named/root.hints.old."
) 2>&1 | /usr/lib/sendmail -t
exit 0

------------------------------cut
here----------------------------------------

Finally, you kick named:

#kill -HUP `pidof named`

And now you can resolv any address on the internet.  My resolv.conf is as
follows:

------------------------------cut
here----------------------------------------

search ihs.com ampr.org
nameserver 10.0.0.1

------------------------------cut
here----------------------------------------

This tells resolv to look in ihs.com, then ampr.org then if it still hasn't
found the address, it will use the hints to search the rest of the internet.
I don't hold 100% to my interpretation of the theory part of this, but this
setup works for me.

73's
Jim
KE4IHI


> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of John J. Bauerly
> Sent: Thursday, January 21, 1999 12:58 PM
> To: [EMAIL PROTECTED]
> Subject: ampr DNS
>
>
> Hello all;
>
> I am trying to get my RedHat 5.1 Linux box to act as DNS for the radio
> ports with AX25 utilites. I have installed Bind8 and followed the DNS
> set-up. Locally it works. Here is the problem. If I place
> myself first in
> the resolv.conf file any tcpip activity going to the internet
> gateway will
> not be resolved. Locally this works fine. Putting myself last in the
> resolv.conf allows tcpip to the gate. But any local stations
> not updated at
> ampr.org will not work locally. The desired results is for my
> station to do
> the lookup first then pass the lookup to AMPR.ORG on the
> internet if not
> found locally. Has anyone set this up successfully?
>
> John J. Bauerly NW0I
> [EMAIL PROTECTED]
>

Reply via email to