I have Ubuntu 20.04 VPS (LEMP) and installed iptables-persistent
. In this server, I have installed fail2ban
and configured with CloudFlare
to ban fail2ban banned IP's. Also, I use the CSF. I use a custom SSH port and I configure it via CSF too. In Fail2ban jail.local
action, I use "iptables-allports
".
The problem is when the Fail2ban trigger IPv6 banned action, iptables-persistent not blocking that IPv6 IP's. For an instance, If Fail2ban banned my IPv6, still I can connect to my VPS over SSH or SFTP. But Cloudflare successfully blocked the HTTPS access (port 443 and port 80).
If Fail2ban banned IPv4, that IP successfully blocked by the iptables-persistent (including the custom SSH port).
Any way to correct this IPv6 issue?