libwrap dependency


Hope you still remember your RHCE Training and TCP Wrapper’s /etc/hosts.allow and /etc/hosts.deny files.

You have used these files to control those services those are “libwrap” dependent. You must be aware that TCP Wrapper can manage only those services which uses library files.

Yes you can use the “ldd” command to find out that whether a particular service can be managed via TCP Wrapper or not. But, this can be a very lengthy job if you intend to control number of services.

So the better way is to get the list of all the binaries / services those are dependent on “libwrap” and do it once.

GEEKS !! You can use the egrep command for this purpose.

Here is a small illustration from my machine. First ldd command showing the output for a single service and then I have used egrep to get a list of all the services using libwrap.

Finding libwrap dependent services

Finding libwrap dependent services