Introduction
Tcp Wrapper is a Library which provides control access and logging for the services over a server which accepts tcp connections.Most of the Linux Systems are compiled with tcp wrappers. it is a network filter ACL(access control list) that is used to filter the network access.
How TCP Wrappers Help?
- helps in system logging
- pattern matching access control
- verifies the hostname
- Protection against spoofing attacks
Explanation
Now to check if a program is compiled with tcp wrapper we use following command.
and this is gonna provide us information if the service is compiled with wrapper library. See example Below.ldd /path/to/program | grep wrap
as we can see that libwrap.so is dependency for sshd service.
Further we can use /etc/hosts.allow & /etc/hosts.deny Files to control system access. Let's Say i want to Deny all to access MySQL service and allow only Localhost. Following will be Configuration for it.
You can Set WildCard for it aswell to allow a list or a network. Let's say you want to allow a subnet as 192.168.*.* for SSH services.


