Adding shell commands to hosts.deny and hosts.allow
I'm running Debian Woody, but I can't seem to find documentation about running shell commands from within hosts.deny (and hosts.allow). Currently, I have the standard deny file...
ALL : ALL
I want to add logging, but I'm getting errors...
ALL : ALL : (/bin/echo "$(/bin/date) %H TCPW: %d" >> /var/log/secure)
bad option name: "(/bin/echo"
ALL : ALL : spawn(/bin/echo "$(/bin/date) %H TCPW: %d" >> /var/log/secure)
bad option name: "spawn(/bin/echo"
Any help on the syntax? Thanks in advance!
man hosts.deny and .allow both just display the file in a horrible format.
sysklogd looks promising, but i can't get the most basic shell commands to validate in hosts.deny
I'm checking my files with tcpdchk.
The following is the correct syntax. I highly recommend denying and logging everything...
ALL : ALL : spawn /bin/echo \
$(/bin/date) \: %h \: %d \
|All times are GMT -5. The time now is 05:17 AM.|