4.10.2 TCP Wrappers - creating a hosts.deny file - file exists

Information

Once TCP Wrappers are installed a /etc/hosts.deny file should be created and be configured.

The /etc/hosts.deny file describes the names of the hosts which are not allowed to access the local inetd services, as decided by the /usr/sbin/tcpd server. All access should be denied by default unless explicitly authorized.Access is granted when a (daemon,client) pair matches an entry in the /etc/hosts.allow file. Access is denied when a (daemon,client) pair matches an entry in the /etc/hosts.deny file. However, access is granted if matching entry does not exist in both the files. This is why, by default, all access must be denied.

Solution

Create a /etc/hosts.deny file-

touch /etc/hosts.deny
chown root:system /etc/hosts.deny
chmod u=rw,go= /etc/hosts.deny

See Also

https://workbench.cisecurity.org/files/528