Is it possible to use action tags in a regex?

In particular, I would like to be able to match the local host's name in a 
regex.  Suppose log lines look like this:

Oct 05 08:14:08 myhostname mydaemon[12345]: Nasty behavior from 192.168.1.1 
port 56789

For the filter for this daemon, this works:

prefregex = myhostname mydaemon\[\d+\]:[ ]
failregex = Nasty behavior from <ADDR>

But I have multiple machines and I would like a filter that does not have to be 
customized for each one.  So I tried this:

prefregex = <sh-hostname> mydaemon\[\d+\]:[ ]

but that does not work.  So, is there a way to use the <sh-hostname> tag in a 
regex?  Is there some other way to match the local hostname?

Thanks.
_______________________________________________
Fail2ban-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fail2ban-users

Reply via email to