# Tcp Wrappers question



## tmw (May 25, 2009)

Hello, i have a question, i read in handbook that tcp wrappers restrict only daemons runs by inetd. But when im blocking all services my openssh is blocked too but openssh is not run by inetd (inetd is not running). Is this normal?


----------



## phoenix (May 25, 2009)

On FreeBSD, just about everything in the base OS is compiled with TCP Wrappers support.


----------



## tmw (May 25, 2009)

Thx !


----------



## anomie (May 25, 2009)

For the sake of completeness, there's a quick way to check whether a binary was compiled with tcp wrapper support. 


```
%whereis -b sshd
sshd: /usr/sbin/sshd

%ldd /usr/sbin/sshd | grep 'libwrap'
        libwrap.so.4 => /usr/lib/[b]libwrap.so.4[/b] (0x280f5000)
```

In other words, first locate the binary, then check to see if ldd(1) lists *libwrap.so* as a dependency. If so, it is compiled with tcp wrapper support.


----------



## phospher (Jun 8, 2009)

that is very useful. thanks anomie!


----------

