-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default SSH jail broken on Ubuntu #20
Comments
Thanks for your report. Which version of Ubuntu/ The mentioned PR creates and enables a custom Would you mind posting the |
I'll try to get this for you this week @ganto 😄 |
I'm having the same issue. With no custom vars the playbook fails to create a valid setup. Same errors as reported above with Ubuntu 16.04.3 and fail2ban 0.9.3-1 (which is what the playbook installed): On the debops control host:
On the target host:
In jail.local:
[ssh] NOTE: filter.d does not include an ssh.conf. Also there appears to be a default jail conf set in jail.conf and jail.d/defaults-debian.conf:
Had to remove my note about a workaround because even though the playbook passes, fail2ban still dies:
PS: It would be nice to be able to over-ride the default sender entry with a custom var. I tried including a fail2ban_sender entry in my var file but it didn't seem to make it into the jail.local output. |
Ok, thanks for the report. With those details I can work and will fix it asap. |
For additional information, this evening I spun up a fresh Ubuntu 16.04 VM (using vagrant with the bento/ubuntu-16.04 box). Then I did "apt-get install fail2ban" and that produces a setup with a default jail of [sshd], and the fail2ban service starts without errors and there are no errors listed in "fail2ban-client -d". So it isn't an issue with the base Ubuntu 16.04 setup or the fail2ban 0.9.3-1 package. Also in the previous report I was starting from a fresh VM, running "debops bootstrap", and then "debops" with a hosts file that only had a [debops_fail2ban] entry (i.e. no other roles or custom stuff being done). |
I've got the same issue with debian 9.1, I make it works by replacing in defaults/main.yml :
By :
|
I apologize, the idea of renaming the default SSH jail in #19 was crap. I now changed the approach which should hopefully fix the jail name mismatch on Xenial, Stretch and others. |
Since the changes from #19, fail2ban won't start anymore. That's because the SSH jail in Ubuntu isn't
ssh
, butsshd
. So now, fail2ban just refuses to start since there's nossh
filters on Ubuntu:Before it wasn't an issue because it wasn't added to
jail.local
, but now it is. I'm not even sure if it's necessary for Debian either. Is the jail injail.conf
? It is on Ubuntu.The text was updated successfully, but these errors were encountered: