Thursday, May 20, 2010

Howto:Check if service supports TCP wrappers

You have added a correct entry to /etc/hosts.allow to allow certain clients to connect for certain service, you save the changes but nothing happens!
You recheck the syntax, but everything seems to be just right...
What happened here and why? 
Not all services support TCP wrapping, to determine if they do we will need to querry them via "ldd" command and see their shared library dependencies, let's take sshd service as an example:

# ldd `which sshd` |grep -i libwrap => /lib64/ (0x00007f04d29fd000)

The presense of libwrap module in ldd output states that the current service supports TCP wrappers.

No comments: