nixCraft Poll

Topics

How to find out which network service are NOT linked against libwrap.s / tcpd (TCPWrapper)

Posted by Vivek Gite [Last updated: September 12, 2006]

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)

Want to stay up to date with the latest Linux tips, news and announcements? Subscribe to our free e-mail newsletter or RSS feed to get all updates. You can Email this page to a friend.

You may also be interested in other helpful articles:

Discussion on This Article:

  1. Sean Says:

    There’s also ldd:

    $ ldd /usr/sbin/sshd | grep wrap
    libwrap.so.0 => /usr/lib/libwrap.so.0 (0×00cc3000)

    Sean

  2. nixcraft Says:

    Thanks for pointing out ldd.

    Appreciate your post.

Leave a Reply

We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Copyright © 2004-2008 nixCraft. All rights reserved - TOS/Disclaimer - Privacy policy - Sitemap - Powered by Open source software.