mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-02-16 02:45:40 +08:00
fix(firewall): 删除复杂转发规则时报错 (#7791)
Some checks failed
SonarCloud Scan / SonarCloud (push) Failing after 10s
Some checks failed
SonarCloud Scan / SonarCloud (push) Failing after 10s
This commit is contained in:
parent
74583aa1aa
commit
7905dd00a6
1 changed files with 2 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue