Pollywog <[EMAIL PROTECTED]> writes:
>On 12-Dec-1999 Mark Wagnon wrote:
>> On 12/11/99 06:54PM, Pollywog wrote:
>>> ALL:ALL : spawn (echo Attempt from %h %a to %d at `date` | tee -a
>>> /var/log/tcp.deny.log |mail [EMAIL PROTECTED])
>> I gave this a shot, but nothing happened. Apparently I don't have a
>> spawn command on my machine. I have a spawn_console and a
>> spawn_login, and neither have man pages.
>I believe "spawn" is part of the bash shell.
>It seems to work for me.

No, "spawn" is part of the syntax for the /etc/hosts.deny (and .allow)
configuration file, which is used by the TCP wrappers library and the
tcpd program. It's described in the hosts_options(5) manual page:
#       spawn shell_command
#              Execute,  in  a  child process, the specified shell
#              command, after performing the %<letter>  expansions
...

There's also a "twist", which connects the child process to the
network connection (so if you run "echo" via "twist", the text is sent
to the other end of the connection).

Also, please note that TCP wrappers logs both allowed and denied
connections to syslog, so if you only want the stuff in a log, you
don't need to execute special commands. You can set the log priority
(info, notice, critical, etc.) via the "severity" option, also
described on the hosts_options(5) manual page.

-- 
-=- Rjs -=- [EMAIL PROTECTED]

Reply via email to