sshd : .example.com : severity emerg
It is also possible to specify a facility using the
severity
option. The following example logs any
SSH connection attempts by hosts from the
example.com
domain to the
local0
facility with a
priority of
alert
:
sshd : .example.com : severity local0.alert
Note
In practice, this example does not work until the syslog daemon (
syslogd
) is
configured to log to the
local0
facility. Refer to the
syslog.conf
man page for
information about configuring custom log facilities.
2.2.2. Access Control
Option fields also allow administrators to explicitly allow or deny hosts in a single rule by adding
the
allow
or
deny
directive as the final option.
For instance, the following two rules allow SSH connections from
client-1.example.com
, but
deny connections from
client-2.example.com
:
sshd : client-1.example.com : allow sshd : client-2.example.com : deny
By allowing access control on a per-rule basis, the option field allows administrators to
consolidate all access rules into a single file: either
hosts.allow
or
hosts.deny
. Some
consider this an easier way of organizing access rules.
2.2.3. Shell Commands
Option fields allow access rules to launch shell commands through the following two directives:
•
spawn
— Launches a shell command as a child process. This option directive can perform
tasks like using
/usr/sbin/safe_finger
to get more information about the requesting client
or create special log files using the
echo
command.
In the following example, clients attempting to access Telnet services from the
example.com
domain are quietly logged to a special file:
in.telnetd : .example.com \ : spawn /bin/echo `/bin/date` from
%h>>/var/log/telnet.log \ : allow
Chapter 17. TCP Wrappers and ...
316
Summary of Contents for ENTERPRISE LINUX 4.5.0 -
Page 1: ...Red Hat Enterprise Linux 4 5 0 4 5 0 Reference Guide ISBN N A Publication date ...
Page 2: ...Red Hat Enterprise Linux 4 5 0 ...
Page 4: ...Red Hat Enterprise Linux 4 5 0 ...
Page 24: ...xxiv ...
Page 26: ......
Page 36: ...12 ...
Page 72: ...48 ...
Page 112: ...88 ...
Page 122: ...98 ...
Page 140: ...116 ...
Page 142: ......
Page 300: ...276 ...
Page 318: ...294 ...
Page 320: ......
Page 332: ...308 ...
Page 350: ...326 ...
Page 378: ...354 ...
Page 388: ...364 ...
Page 394: ...370 ...
Page 395: ...Part IV Appendixes ...
Page 396: ......