tcpd is use as a access control facility for internet services. It can be set up to monitor incoming requests for telnet, sshd, finger, ftp, exec, rsh, rlogin, tftp, talk, comsat and other services that have a one-to-one mapping onto executable files.
These days almost all leading Linux distros network services are linked against libwrap.a in order to take advantage of the tcpwrappers access control facility.
However some time few services (especially third party apps) does not link itself against libwrap.
You can easily find out if particler installed network service is NOT linked against libwrap.s / tcpd using strings command.
strings command print the strings of printable characters in files especially binary files thus strings is mainly useful for determining the contents of non-text / binary files.
For example find out if sshd network service can use tcpd or not:
$ strings $(which sshd)| grep libwrap
Output:
libwrap.so.0 libwrap refuse returns
Above output, clearly indicate that sshd is linked against libwrap.s / tcpd (TCPWrapper) service. See how to use tcpd to restrict ssh access.
Update:
Sean pointed out ldd command:
$ ldd /usr/sbin/sshd | grep -i libwrapOR# ldd $(which sshd) | grep -i libwrap
Output:
libwrap.so.0 => /lib/libwrap.so.0 (0x40020000)
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop












{ 2 comments… read them below or add one }
There’s also ldd:
$ ldd /usr/sbin/sshd | grep wrap
libwrap.so.0 => /usr/lib/libwrap.so.0 (0x00cc3000)
Sean
Thanks for pointing out ldd.
Appreciate your post.