Skip to content
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

Fail2Ban fails to add sshd jail #36

Closed
Destarianon opened this issue Apr 24, 2019 · 10 comments
Closed

Fail2Ban fails to add sshd jail #36

Destarianon opened this issue Apr 24, 2019 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@Destarianon
Copy link

Using Ubuntu 18.04 when running the command
sudo fail2ban-client add sshd

I receive the error message:
name 'noduplicates' is not defined

The config file is exactly as described in the guide. All previous fail2ban commands ran successfully with no warnings.

@imthenachoman
Copy link
Owner

What is the output of sudo grep -i -R noduplicates /etc/fail2ban?

@imthenachoman imthenachoman self-assigned this Apr 25, 2019
@imthenachoman imthenachoman added the bug Something isn't working label Apr 25, 2019
@Destarianon
Copy link
Author

The output is completely blank.

@imthenachoman
Copy link
Owner

Humm. I am not sure why you are getting that error. I can' find anything in the docs or online. Try posting on https://askubuntu.com/. I will keep looking too.

@Destarianon
Copy link
Author

I have worked around the issue by removing the [sshd] jail from the default configuration which seems to have cleared up the error, but doesn't really explain what caused it to begin with.

@imthenachoman
Copy link
Owner

Did you take a backup? What was in the [sshd] jail from the default configuration?

@celine168
Copy link

I know this is an old issue, but this is what it says in etc/fail2ban/jail.d/defaults-debian.conf:

[sshd]
enabled = true

@siebenbrunner
Copy link

fyi, I had the same issue, and simply changing [sshd] to [ssh] and then running sudo fail2bain-client add ssh fixed it. Also, I added the whole section in the /etc/fail2ban/jail.local file instead of creating a separate one.

@hellresistor
Copy link
Contributor

I think Isn't needed add the sshd because are inside of jail.local file and/or /jail.d/defaults-debian.conf

@lgaida
Copy link

lgaida commented Dec 28, 2019

I'm setting up a server with on Debian 10 (Buster)
and i'm also getting name 'noduplicates' is not defined
after running sudo fail2ban-client add sshd

However sudo fail2ban-client status still lists sshd
and even sudo fail2ban-client status sshd prints the expected output as per README.md

As celine168 and hellresistor already said: looks like you don't have to add sshd on your own since it is enabled by default

@imthenachoman
Copy link
Owner

Closing as this issue seems resolved. Thanks!

imthenachoman added a commit that referenced this issue Dec 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants