[comp.unix.admin] Denying ListHosts

brendan@cs.widener.edu (Brendan Kehoe) (12/06/90)

 Is it possible to have my dns service [standard Sun named] deny the
ListHosts facility from remote hosts without installing bind 4.8.3?

-- 
    Brendan Kehoe - Widener Sun Network Manager - brendan@cs.widener.edu
 Widener University in Chester PA              A Bloody Sun-vs-Dec War Zone
 Hey ... do you think George Bush carries money or any kind of ID with him?

mst@mx.csun.edu (Michael Temkin) (12/10/90)

In article <1990Dec05.174635.12385@cs.widener.edu> brendan@cs.widener.edu (Brendan Kehoe) writes:
>
> Is it possible to have my dns service [standard Sun named] deny the
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>    Brendan Kehoe - Widener Sun Network Manager - brendan@cs.widener.edu

Someone please correct me if I am wrong, but I heard (from a friend who
got it from an SE at SUN) that sun does not support dns (atleast not without
running NIS), nor do they have any intention of ever supporting dns.  If it
is supported (without NIS) someone please fill me in on how.

T.I.A,

Mike.

--
Mike Temkin
mst@csun.edu
Cal. State U. Northridge, School of Engineering and Computer Science
Voice phone: (818) 885-3919

boyter@bimbo.uucp (Maj Brian Boyter) (12/10/90)

mst@mx.csun.edu (Michael Temkin) writes:
>Someone please correct me if I am wrong, but I heard (from a friend who
>got it from an SE at SUN) that sun does not support dns (atleast not without
>running NIS), nor do they have any intention of ever supporting dns.  If it
>is supported (without NIS) someone please fill me in on how.

Sun does support dns...   It's just not the default (NIS is the default)...
The how:
  1) You need a named.boot, named.ca, named.inv, named.local, etc...
     There is a whole chapter in the 4.1 manuals devoted to this...
  2) Start in.named (in rc.local)...   You can test the dns with nslookup...
  3) Now all you need is for all the network-related programs to use dns
     instead of NIS...   This takes a new libc with the resolver routines
     included...   The instrauctions were posted to the net back in April
     and here thet are again:

Brian

-------------------------------------------------------------------------
Newsgroups: comp.sys.sun
Subject: Revised posting on how to create libc_resolv.so under SunOS 4.1
X-Sun-Spots-Digest: Volume 9, Issue 176, message 3

Evan Wetstone's posting to Sun-Spots about libc+resolv under 4.1 has
reminded me to repost a slightly revised version of the instructions.
This is prompted by 3 things:

1. The original, virgin /usr/lib/shlib.etc/README file has an oversight
   in it; The original mentions that 2 files in the archive library need to
   be renamed after they are extracted, because the names are truncated at 16
   characters.  This is true for the Sun-3 and Sun-3x, but on Sun-4's and
   Sun-4c's (SPARCstation-1's, 1+'s, and presumably SLC's), there is an
   additional library module whose name is also truncated.  This is
   corrected.

2. Several people complained to me that my instructions, being placed as
   an addendum rather than in line with the rest of the instructions, were
   thus unneccessarily confusing, and could even (if misinterpreted) cause
   someone to build a libc that would not work.

3. I accidentally included my .signature file at the end of the posting,
   and then told everyone to append the rest of my message to their README
   files, thus immortalizing my .signature in everybody's README (^:  I
   humbly apologize ...

So, without further ado, here is the revised version of the file
/usr/lib/shlib.etc/README.  I recommend backing up the original, nuke my
previous version (the one that Evan re-posted), and insert this in its
place.

Greg Earle			| "This is Kraft.  It uses a blue box.
Sun Microsystems, Inc.		|  This is Stouffer's.  It uses red.
JPL on-site Software Support	|  The choice is yours."
sun!poseur!earle		| Pretty damn convincing argument, eh?

-------------  >8  Cut here - /usr/lib/shlib.etc/README  8<  ---------------

This is a procedure you can use to substitute or add 
a module in your shared libc C library. 

Note! If you are interested in a System V libc, please substitute
	libc_pic.a for libcs5_pic.a in step 3, 
	libc.so.x.y.z for libcs5.so.x.y.z in step 8.

1. Become super user
     % su

2. Make a temporary directory
     # mkdir tmp

3. Change to the "tmp" directory just made, extract the pic .o from
   libc_pic.a and rm the file __.SYMDEF. The reason you need to do the 2 (or
   3) "mv" commands is because "ar" truncated filenames over 16 characters.
     # cd tmp
     # ar x ../libc_pic.a
     # rm __.SYMDEF
     # mv rpc_dtablesize. rpc_dtablesize.o
     # mv rpc_commondata. rpc_commondata.o
   If on a Sun-4, perform this additional `mv' command:
     # mv xccs_multibyte. xccs_multibyte.o

   Here are some extra instructions for building a shared libc.so that uses
   the resolver for hostname/addr resolution:

3a. Extract the contents of libc_pic.a and /usr/lib/libresolv.a into the
    tmp directory:
     # ar x /usr/lib/libresolv.a

    The libresolv.a contains object modules that are position independant, so
    they can be added to the libc_pic modules.

    *Note*  If you have your own copy of the resolver library sources,
    (perhaps from a post-4.8 BIND distribution) you can compile each of these
    modules yourself using `cc -pic' and the resulting object modules *should*
    be usable in this schema as well.  To test that the custom resolver
    modules will be usable, cd to the directory containing the custom resolver
    sources and object modules and perform this test:

     # ld -assert pure-text *.o

    If `ld' issues no complaints, then you can assume that the object modules
    are safe to use.

3b. Remove the old routine to do the hostname/addr resolution:
     # rm gethostent.o

3c. Remove the libresolv module that contains `strncasecmp' (which is now
    in the main C library, so it is redundant):
     # rm strcasecmp.o

3d. As mentioned in step 5 below, edit the file `lorder-sparc' in the ..
    directory.  Remove the reference to `gethostent.o' and add the references
    to the resolver library routines by applying this patch:

	*** lorder-sparc.orig	Thu Feb  8 05:27:46 1990
	--- lorder-sparc	Mon Apr  9 12:58:59 1990
	***************
	*** 150,154 ****
	  getwd.o
	  getnetgrent.o
	! gethostent.o
	  ypxdr.o
	  ttyname.o
	--- 150,161 ----
	  getwd.o
	  getnetgrent.o
	! gethostnamadr.o
	! sethostent.o
	! res_query.o
	! res_mkquery.o
	! res_send.o
	! res_debug.o
	! res_comp.o
	! res_init.o
	  ypxdr.o
	  ttyname.o

3e. Continue on, from steps 6 to 9 (i.e., skip steps 4 and 5 immediately
    below).

4. Replace or add the .o that you wanted by doing a copy. Please note here
   that you are advised to create your object with the following compiler
   option, i.e "cc -c -pic yourprogram.c" to make it shareable.
     # cp your.o .

5. If you add a new module then you need to do this step.  You need to
   edit the file "lorder-sparc" and add the name of the file you have copied
   from step 4 at the end of this file. 
     # vi ../lorder-sparc

6. # cd ..

7. # make libc.so

8. Now you should have some libc.so.x.y.z built in the current directory.
   It is recommended that you tested out this library at this point before
   installing it. You can do so by setting the environment LD_LIBRARY_PATH
   to the current directory for example:
     # setenv LD_LIBRARY_PATH `pwd`
     # your_favorite_test_cmd
   Once you are satisfied that the new library worked, you can proceed to
   install it with the following commands:
     # cp libc.so.x.y.z /usr/lib
     # ldconfig
     # unsetenv LD_LIBRARY_PATH

9. You are now running with the new library. You can verify this by doing
   a trace command of let's say "date".
     # trace date
   The output should informed you that the new library is being used.

-- 
---------------------------------------------------------------
   Maj. Brian A Boyter
   US Army Foreign Science & Technology Center
   Charlottesville, Va 22901                         __
   off: (804)980-7362                              (    )
   home:     973-9440                             {      }
                                                   (    )
   boyter@fstc-chville.army.mil                      ||
                                                     ||
   Just say glow......                       _______<  >_______

nieusma@eclipse.colorado.edu (Jeff Nieusma) (12/11/90)

In article <1990Dec9.170307.12120@csun.edu>, mst@mx.csun.edu (Michael
Temkin) writes:
|> In article <1990Dec05.174635.12385@cs.widener.edu>
|> brendan@cs.widener.edu (Brendan Kehoe) writes:
|> >
|> > Is it possible to have my dns service [standard Sun named] deny
|> the
|>                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|> >    Brendan Kehoe - Widener Sun Network Manager -
|> brendan@cs.widener.edu
|> 
|> Someone please correct me if I am wrong, but I heard (from a friend
|> who
|> got it from an SE at SUN) that sun does not support dns (atleast not
|> without
|> running NIS), nor do they have any intention of ever supporting dns. 
|> If it
|> is supported (without NIS) someone please fill me in on how.
|> 
|> T.I.A,
|> 
|> Mike.
|> 
|> --
|> Mike Temkin
|> mst@csun.edu
|> Cal. State U. Northridge, School of Engineering and Computer Science
|> Voice phone: (818) 885-3919

sun is definately not in a big hurry to use DNS.  I HIGHLY recommend against
using sun's DNS.  they are way behind the times...  You will need to get into
the code for denying AXFR records anyway, so you might as well just make your
own named from src.  It's free...  I highly recommend making your own resolver
as well, since sun's version is less than adequate.

If you have any more questions about DNS, feel free to e-mail me off-line and
we can get to the bottom of this.  

For anyone who's intersted, I have put the resolver into libc for SunOS 4.1
and made it available in binary and src form via anon ftp to 
alumni.colorado.edu 128.138.240.32 in pub/libc.tar.Z

+-----------------------------------------------------------------------------+
| Jeff Nieusma                         Logical:  nieusma@boulder.colorado.edu |
| System Administrator/Programmer      Audible:  (303) 492-0677               |
| Computer Science Department         Physical:  Campus Box 430               |
| University of Colorado                         Boulder, CO  80309-0430      |
+-----------------------------------------------------------------------------+
| Work exists only to make play more fun, so if play is fun enough, why work? |
+-----------------------------------------------------------------------------+