diff --git a/backend/utils/firewall/client/ufw.go b/backend/utils/firewall/client/ufw.go index 70f2197d0..72c7d1f93 100644 --- a/backend/utils/firewall/client/ufw.go +++ b/backend/utils/firewall/client/ufw.go @@ -75,7 +75,7 @@ func (f *Ufw) ListPort() ([]FireInfo, error) { var datas []FireInfo isStart := false for _, line := range portInfos { - if strings.HasPrefix(line, "--") { + if strings.HasPrefix(line, "-") { isStart = true continue } @@ -100,7 +100,7 @@ func (f *Ufw) ListAddress() ([]FireInfo, error) { var datas []FireInfo isStart := false for _, line := range portInfos { - if strings.HasPrefix(line, "--") { + if strings.HasPrefix(line, "-") { isStart = true continue }