portmap-5beta

Introduction to portmap

The portmap package is a more secure replacement for the original SUN portmap package. Portmap is used to forward RPC requests to RPC daemons such as NFS and NIS.

Package information

Installation of portmap

Install portmap with the following commands:

patch -Np1 -i ../portmap-5beta-compilation-fixes-2.patch &&
patch -Np1 -i ../portmap-5beta-glibc-errno-fix.patch &&
make &&
make install

Note: The above installation places executable portmap in /sbin. You may choose to move the file to /usr/sbin. If you do, remember to modify the bootscript.

Configuring portmap

Config files

/etc/rc.d/init.d/portmap

Create the portmap boot script

cat > /etc/rc.d/init.d/portmap << "EOF"
#!/bin/sh
# Begin /etc/rc.d/init.d/portmap

source /etc/rc.d/init.d/functions

case "$1" in
        start)
                echo "Starting RPC Portmap"
                loadproc /sbin/portmap
                ;;

        stop)
                echo "Stopping Portmap"
                killproc /sbin/portmap
                ;;

        restart)
                $0 stop
                /bin/sleep 1
                $0 start
                ;;

        *)
                echo "Usage: $0 {start|stop|restart}"
                exit 1
        ;;

esac

# End /etc/rc.d/init.d/portmap
EOF
chmod 754 /etc/rc.d/init.d/portmap &&
cd /etc/rc.d/init.d &&
ln -sf ../init.d/portmap ../rc0.d/K49portmap &&
ln -sf ../init.d/portmap ../rc1.d/K49portmap &&
ln -sf ../init.d/portmap ../rc2.d/K49portmap &&
ln -sf ../init.d/portmap ../rc3.d/S22portmap &&
ln -sf ../init.d/portmap ../rc4.d/S22portmap &&
ln -sf ../init.d/portmap ../rc5.d/S22portmap &&
ln -sf ../init.d/portmap ../rc6.d/K49portmap

Contents

The portmap package contains portmap, pmap_dump and pmap_set.

Description

portmap

portmap is the RPC port mapper.

pmap_dump

pmap_dump saves the port mapping table to an ASCII file.

pmap_set

pmap_set restores the port mapping table from an ASCII file.