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 ufw ipv6 fix #12

Open
ugjka opened this issue Dec 21, 2023 · 0 comments
Open

fail2ban ufw ipv6 fix #12

ugjka opened this issue Dec 21, 2023 · 0 comments

Comments

@ugjka
Copy link
Owner

ugjka commented Dec 21, 2023

          I also had a problem that a IPv6 attacker was not blocked. First check your current ufw version:
$ ufw version

If you have >= 0.36 you can either adapt /etc/fail2ban/action.d/ufw.conf or create a new file /etc/fail2ban/action.d/ufw-custom.conf with the necessary change:

$ diff ufw.conf ufw-custom.conf 
17c17
<             ufw insert <insertpos> <blocktype> from <ip> to <destination> $app
---
>             ufw prepend <blocktype> from <ip> to <destination> $app
23,26d22
< # Option: insertpos
< # Notes.:  The position number in the firewall list to insert the block rule
< insertpos = 1
< 

and use that in /etc/fail2ban/jail.local.

Originally posted by @blinkeye in fail2ban/fail2ban#2331 (comment)

@ugjka ugjka changed the title I also had a problem that a IPv6 attacker was not blocked. First check your current ufw version: fail2ban ufw ipv6 fix Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant