mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-10 23:24:32 +08:00
Merge pull request #1554 from gravitl/bugfix_v0.15.2_nft_rules
remove unnecessary nft rule
This commit is contained in:
commit
0da5c388b6
1 changed files with 0 additions and 7 deletions
|
@ -4,7 +4,6 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -334,12 +333,6 @@ func firewallNFTCommandsCreateEgress(networkInterface string, gatewayInterface s
|
||||||
postUp += "nft add table nat ; "
|
postUp += "nft add table nat ; "
|
||||||
postUp += "nft 'add chain ip nat prerouting { type nat hook prerouting priority 0 ;}' ; "
|
postUp += "nft 'add chain ip nat prerouting { type nat hook prerouting priority 0 ;}' ; "
|
||||||
postUp += "nft 'add chain ip nat postrouting { type nat hook postrouting priority 0 ;}' ; "
|
postUp += "nft 'add chain ip nat postrouting { type nat hook postrouting priority 0 ;}' ; "
|
||||||
for _, networkCIDR := range gatewayranges {
|
|
||||||
if net.ParseIP(networkCIDR).To16() != nil {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
postUp += "nft add rule nat postrouting iifname " + networkInterface + " oifname " + gatewayInterface + " ip saddr " + networkCIDR + " masquerade ; "
|
|
||||||
}
|
|
||||||
|
|
||||||
postDown += "nft flush table filter ; "
|
postDown += "nft flush table filter ; "
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue