Summary: forcing ypbind to bind to the local machine securely.

From: Gene Rackow (
Date: Sat Oct 17 1992 - 01:46:04 CDT

My original question was...
> I'm wondering if anyone knows the tricks to force ypbind to
> bind to the ypserv running on the same host. I have several
> slave servers on the net, and would like to have them bind
> to themselves if possible.
> I know I could do a "ypbind -ypset{me}" followed by a "ypset `hostname`"
> but the manuals claim that to be a security hole. I guess what I'd
> really like on those machines is a "ypbind localhost" and not have
> it broadcast out for other hosts.

I didn't get a real solution from the net that solves the
problem in a clean way. I did some additional digging on my own and
found that a tool that I already had available will do exactly what I wanted.

Get the "securelib" package from in the /pub/securelib
directory. Then as part of the install, build your /etc/securelib.conf
file to look something like this. My network is A.B.X.Y and
the local interface on a machine that I have ypbind running on is
A.B.C.D. This limits all of the daemons that I start with the
securelib package to be available ONLY to the A.B addresses, and
forces ypbind to only work off of the local interface. If you have
multiple servers that have more than one interface, you can
add multiple ypbind lines that point at the non-shared subnet sides
to keep the conf file the same on all machines.

# Example config file for securelib.
# <name> <address> <mask>
# note here that ypbind will only take on the local interface
ypbind A.B.C.D
portmap A.B.0.0
ypserv A.B.0.0
ypxfrd A.B.0.0
rpc.ypupdated A.B.0.0
rpc.mountd A.B.0.0
rpc.yppasswdd A.B.0.0

Many thanks to William LeFebvre ( our list maintainer ) for 
not only the list, but writting the securelib package.

Also thanks for taking an interest to: (Michael Harris) (Bruce Mitchell) Mike Raffety <>

Another solution suggested is below. I haven't tried it since it appears to be more work than the method I used. Harder to move hardware around, and more specialized configs per client.

> From: (Bruce Mitchell) > Date: Thu, 15 Oct 92 11:49:03 BST > Message-Id: <>

You cannot rely on ypset; we tried this but had to resort to the following:

We have an NIS master and about a dozen NIS slave servers each with several clients. In order to minimise interdependance between clusters (which can give serious problems when NFS servers go down) we need to force all clients to bind to their own server and each server to bind to itself.

The key to this relies on the fact that ypserv will serve all domains which are present in /var/yp when it starts up.

Each of our NIS servers serves two domains: AND

All clients and servers have their default domain names set to the appropriate For every server domain there is only one server available and clients and servers alike bind consistently and correctly.

On each NIS server, the entry is merely a soft link to the directory. The Makefile on the master must be modified to use the domain for propagating the maps.

We make extensive use of NFS and the automounter and in the past have had serious problems caused by 'random' bindings when NFS servers go down. The above scheme has solved these problems.


Gene Rackow email: Math & Computer Science voice: 708-252-7126 Argonne National Lab FAX: 708-252-5986 9700 S. Cass Ave. / Argonne, IL 60439

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:51 CDT