tcp_wrappers - Host based networking ACL system ChangeLog

HOWTO


# TCP Wrappers 7.6
# ================
# This version of TCP Wrappers was released in 1997
# There will be some patching required below to get it to compile
# The patch also enables a shared libwrap.so which you will need
# to build-in TCP Wrappers support in source sendmail

# Wietse's software, technical hints and tips
# TCP WRAPPER - Network montitoring, access control, and booby traps (PDF)
# Slackware64-15.0 source: n -> tcp_wrappers
# Beyond Linux From Scratch: TCP Wrapper-7.6

# Alternate download location, Open Source Lab mirror:
# (the patch and tar.{bz2,gz} tarball are available there)
# https://ftp2.osuosl.org/pub/blfs/conglomeration/tcp_wrappers/

# Get the tarball
cd
mkdir -p -m 0700 installed
test -f installed/tcp_wrappers_7.6.tar.gz &&
mv -f installed/tcp_wrappers_7.6.tar.gz .
test ! -f tcp_wrappers_7.6.tar.gz &&
wget http://ftp.porcupine.org/pub/security/tcp_wrappers_7.6.tar.gz

# Confirm that the tarball file size is what it should be
test "99438" = $(stat -c %s tcp_wrappers_7.6.tar.gz) && echo "Yey!" || echo Boo

# This may only work if you somehow still have GnuPG 1.x installed,
# or built GnuPG 2.x with --enable-gpg-is-gpg2 and have a gpg and gpg2.
# Verify tarball w/ gpg:
( gpg --list-keys DC80F2A6D5327CB9 > /dev/null 2>&1 ||
  wget -O - http://www.porcupine.org/wietse/wietse.pgp | gpg --import )
wget -nc http://ftp.porcupine.org/pub/security/\
tcp_wrappers_7.6.tar.gz.sig &&
gpg --verify tcp_wrappers_7.6.tar.gz.sig &&
  rm tcp_wrappers_7.6.tar.gz.sig

# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "tcp_wrappers_*" -exec rm -r {} \;
tar xzvf ~/tcp_wrappers_7.6.tar.gz
cd tcp_wrappers_7.6
test $UID = 0 && chown -R root:root .
chmod -R u+w .

# Patch to enable shared library (.so)
# Includes adding -DHAVE_STRERROR to Makefile (for glibc)
test ! -f tcp_wrappers-7.6-shared_lib_plus_plus-1.patch &&
wget -nc https://ftp2.osuosl.org/pub/blfs/conglomeration/tcp_wrappers/\
tcp_wrappers-7.6-shared_lib_plus_plus-1.patch
test -s tcp_wrappers-7.6-shared_lib_plus_plus-1.patch &&
patch -p1 < tcp_wrappers-7.6-shared_lib_plus_plus-1.patch

# Do this also to help with some build issues
sed -i -e "s,^extern char \*malloc();,/* & */," scaffold.c

# Build it
make REAL_DAEMON_DIR=/usr/sbin linux

# Become root to install it
su

# Remove the Slackware package, if there is one
test -x /sbin/removepkg && /sbin/removepkg tcp_wrappers

# Remove old man pages that may conflict, having gzipped ones
# and regular ones at the same time, etc.
( cd /usr/man
  rm -f man3/hosts_access.3* \
   man5/hosts_access.5* \
   man5/hosts_options.5* \
   man8/tcpd.8* man8/tcpdchk.8* man8/tcpdmatch.8* )

# Install it
install -m 0755 -d /usr/doc/tcp_wrappers_7.6
install -m 0644 BLURB CHANGES DISCLAIMER README README.NIS \
/usr/doc/tcp_wrappers_7.6/
install -m 0644 tcpd.h /usr/include/tcpd.h
test $(uname -m) = 'x86_64' &&
( install -m 0644 libwrap.a /usr/lib64/
   install -m 0644 shared/libwrap.so.0.7.6 /usr/lib64/
   ln -sf /usr/lib64/libwrap.so.0.7.6 /usr/lib64/libwrap.so.0
   ln -sf /usr/lib64/libwrap.so.0.7.6 /usr/lib64/libwrap.so )
test $(uname -m) != 'x86_64' &&
( install -m 0644 libwrap.a /usr/lib/
   install -m 0644 shared/libwrap.so.0.7.6 /usr/lib/
   ln -sf /usr/lib/libwrap.so.0.7.6 /usr/lib/libwrap.so.0
   ln -sf /usr/lib/libwrap.so.0.7.6 /usr/lib/libwrap.so )
install -m 0755 -s safe_finger tcpd tcpdchk tcpdmatch try-from /usr/sbin/
install -m 0644 hosts_access.3 /usr/man/man3/
install -m 0644 hosts_access.5 /usr/man/man5/
install -m 0644 hosts_options.5 /usr/man/man5/
install -m 0644 tcpd.8 /usr/man/man8/
install -m 0644 tcpdchk.8 /usr/man/man8/
install -m 0644 tcpdmatch.8 /usr/man/man8/
ldconfig

# Make sure your non-root user can remove the source for later
chown -R $(logname) .
chmod -R u+w .

# Become your non-root user again
exit

# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/tcp_wrappers_*.tar.*
mv -f tcp_wrappers_7.6.tar.gz installed/

List of HOWTOs

Web page itself last updated: 2025-07-04 6:23pm (EST -0500)
HOWTO last updated: 2025-11-19 4:38pm
Copyright © 2001-2026 Jason Englander. All Rights reserved.
[HTML5]