The short version: pick one firewall backend and make everything write to that one. Having iptables-legacy active and nftables installed but idle isn't harmful by itself, but it gets confusing fast when fail2ban or anything else adds rules to the one that isn't actually filtering traffic.
What I'd check:
1. Which one is really in use. `update-alternatives --display iptables` shows whether iptables points at legacy or nft, and `iptables-legacy -S` vs `nft list ruleset` shows where your rules actually live.
2. IPv6. If the install only wrote IPv4 rules, check `ip6tables -S`. If the server has a public IPv6 address and no v6 rules, SIP and the web UI may be wide open on v6. Either add matching v6 rules or disable IPv6 if you don't use it.
3. fail2ban. Set its banaction to match the backend you're using (iptables-multiport for iptables, nftables-multiport for nftables) so bans land in the live ruleset.
4. Event Guard and fail2ban overlap. Event Guard is FusionPBX's own blocker, driven by FreeSWITCH events such as failed SIP registrations, while fail2ban works from log files. Plenty of people run both, but if you do, make sure both write to the same backend, and decide which one owns SIP so you're not troubleshooting double bans.
The simplest setup is usually to stick with whatever the official FusionPBX install script set up for your version, keep that one backend, and only add rules on top of it. If you post the output of `iptables -S` and `ip6tables -S` with your IPs masked, people can sanity-check it.