Skip to content

Commit

Permalink
Revert "fix(firewall): 删除复杂转发规则时报错 (#7791)"
Browse files Browse the repository at this point in the history
This reverts commit 7905dd0.
  • Loading branch information
wanghe-fit2cloud authored Feb 5, 2025
1 parent 7905dd0 commit 9047bc2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions backend/utils/firewall/client/iptables.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,8 @@ func (iptables *Iptables) NatRemove(num string, protocol, srcPort, dest, destPor
// 删除公网转发规则
if dest != "" && dest != "127.0.0.1" && dest != "localhost" {
if err := iptables.runf(NatTab, fmt.Sprintf(
"-D %s -p %s -d %s --dport %s -j MASQUERADE",
"-D %s -p %s --dport %s -j DNAT MASQUERADE",
PostRoutingChain,
dest,
protocol,
destPort,
)); err != nil {
Expand Down

0 comments on commit 9047bc2

Please sign in to comment.