Skip to content

Commit 256bb80

Browse files
authored
Merge pull request #3 from stawil15/fix_ufw_delete
fixing removeUFWRule
2 parents 8cbcaeb + c75d251 commit 256bb80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

firewall/ufw.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func removeUFWRule(ip string) error {
6969
}
7070
port, proto := parts[0], parts[1]
7171

72-
cmd := fmt.Sprintf("sudo ufw delete proto %s from %s to any port %s", proto, ip, port)
72+
cmd := fmt.Sprintf("sudo ufw delete allow proto %s from %s to any port %s", proto, ip, port)
7373
output, err := utils.RunCommand(cmd)
7474
if err != nil {
7575
return fmt.Errorf("❌ failed to delete rule for port %s: %v\n%s", port, err, output)

0 commit comments

Comments
 (0)