diff --git a/backend/app/service/fail2ban.go b/backend/app/service/fail2ban.go index 59684ccc0..a881cd66a 100644 --- a/backend/app/service/fail2ban.go +++ b/backend/app/service/fail2ban.go @@ -107,7 +107,7 @@ func (u *Fail2BanService) UpdateConf(req dto.Fail2BanUpdate) error { if req.Value == "firewallcmd-ipset" || req.Value == "ufw" { itemName := "ufw" if req.Value == "firewallcmd-ipset" { - itemName = "firewallcmd" + itemName = "firewalld" } client, err := firewall.NewFirewallClient() if err != nil { diff --git a/backend/utils/firewall/client/firewalld.go b/backend/utils/firewall/client/firewalld.go index 569e286d0..4c9a2a723 100644 --- a/backend/utils/firewall/client/firewalld.go +++ b/backend/utils/firewall/client/firewalld.go @@ -106,6 +106,7 @@ func (f *Firewall) ListPort() ([]FireInfo, error) { } itemRule := f.loadInfo(rule) if len(itemRule.Port) != 0 && itemRule.Family == "ipv4" { + itemRule.Family = "" datas = append(datas, itemRule) } }