How to make Fail2Ban ban both the IPv6 address and the respective IPv4 address at the same time?

469 Views Asked by At

I'm setting up a Linux system with Fail2Ban installed and have noticed that when banning a system by it's IPv6 address it doesn't ban the respective IPv4 address at the same time effectively doubleing the amount failed requests a client can make before becoming banned how do I configure it to ban both simultaniously?

1

There are 1 best solutions below

1
Mime On

You can't, as the IPv4 and the IPv6 address are not directly connected to each other.

IPv6 is directly connected to the MAC address of the specific interface, while IPv4 may be a value choosen in a specific range, not in relation to attributes of the specific interface.

Also see this related answer and differences between IPv4 and IPv6