I'm looking for a way to use fail2ban to control/block samba logins on Ubuntu 12.04.3 LTS.
I already set up an jail.local
. The samba part currently looks like this:
[samba]
enabled = true
port = 135,139,445,137,138
protocol = tcp,udp
I'm missing these two options:
filter =
logpath =
I know that samba log are located in /var/log/samba
, but every hostname has its own file, so what do I have to set as logpath and as filter? Or is this even possible?
Thank you very much
I know that samba log are located in /var/log/samba, but every hostname has its own file
, this is what I tried, and why I failed. I also posted the code I wrote so far. Do the work? I'm asking for 2 little options, where I'm stucked! What are you trying to do? What have you tried in order to make it happen? What results did you expect? What actually happened? Everything is in my Question. I'm really sorry.logpath
(See Iain's answer), but as pointed out in the same answerfilter
is a regex you're going to need to define yourself based on your needs.