TCP Wrappers and Enhanced Logging
If certain types of connections are of more concern than others, the log level can be elevated for that service using the severity
option.
For this example, assume that anyone attempting to connect to port 23 (the Telnet port) on an FTP server is a cracker. To denote this, place an emerg
flag in the log files instead of the default flag, info
, and deny the connection.
To do this, place the following line in /etc/hosts.deny
:
in.telnetd : ALL : severity emerg
This uses the default authpriv
logging facility, but elevates the priority from the default value of info
to emerg
, which posts log messages directly to the console.