mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-01-12 00:06:29 +08:00
fix(firewall): 删除复杂转发规则时报错 (#7791)
This commit is contained in:
@@ -192,8 +192,9 @@ 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 --dport %s -j DNAT MASQUERADE",
|
||||
"-D %s -p %s -d %s --dport %s -j MASQUERADE",
|
||||
PostRoutingChain,
|
||||
dest,
|
||||
protocol,
|
||||
destPort,
|
||||
)); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user