On Sun, 2015-07-26 at 20:10 -0500, Harrison Johnson wrote:

> What version of fail2ban are you using? And they what version of
> systemd are you using. I don't know about nginx but in general create
> a jail.local with:
> 
> [nginx]
> enabled = true
> backend = systemd
> 
> Then you need to know the systmed unit name is
> ?> systemctl | grep '.*nginx.*'
> 
> you should have a line that says something like nginx.service
> 
> in the /filter.d folder either edit the nginx.conf or make a
> ngnix.local file. Either way under the section:
> [Init]
> journalmatch = _SYSTEMD_UNIT=nginx.service
> 
> ?> systemstl systemclt restart fail2ban.service 



> to restart the server watch the log file on start up for errors. But
> before you switch over run this to make sure your journals are good.
> 
> ?> journalctl --verify.
> 
> 
> On Sun, 2015-07-26 at 21:56 +0100, Will Wade wrote: 
> 
> > Hi there
> > I'm on Ubuntu 15.04 and got nginx running fine. As per this question though 
> > I noted that log rotate was screwy : 
> > http://askubuntu.com/questions/629375/nginx-logrotate-logs
> > 
> > The bottom answer is probably the correct one - I should switch over to 
> > systemd. I have done but fail2ban really really can't read my logs now (it 
> > couldn't when log rotate was bust but now it's totally not..)
> > 
> > So I read that fail2ban* has been patched to deal with reading from systemd 
> > but how? Can anyone give me a pointer?
> > 
> > Many thanks 
> > 
> > Will
> > 
> > * https://github.com/fail2ban/fail2ban/pull/224
> > ------------------------------------------------------------------------------
> > _______________________________________________
> > Fail2ban-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/fail2ban-users
> 
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Fail2ban-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/fail2ban-users


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

Reply via email to