portmap-5

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

portmap dependencies

Installation of portmap

Install portmap with the following commands:

patch -Np1 -i ../portmap_5-1.diff &&
patch -Np1 -i ../portmap_5-errno.patch &&
mkdir /usr/share/doc/portmap &&
make &&
make install

Command explanations

patch -Np1 -i ../portmap_5-1.diff: This patch provides added security for the portmap package, including only allowing portmap table changes from the local host.

mkdir /usr/share/doc/portmap: This directory must be created before installation.

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.