portmap-5

Introduction to portmap

Download location (HTTP):       http://files.ichilton.co.uk/nfs/portmap_5.orig.tar.gz
Download location (FTP):        
Version used:                   5
Package size:                   20 KB
Estimated Disk space required:  250 KB
Estimated build time:           0.03 SBU

Required patch:
Download location (HTTP):        http://files.ichilton.co.uk/nfs/portmap_5-1.diff.gz

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.

portmap depends on:
tcpwrappers-7.6

Installation of portmap

Install portmap with the following commands:

patch -Np1 -i ../portmap_5-1.diff &&
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.