Created
February 4, 2022 10:15
-
-
Save fengjijiao/e0a884e730c5fbe453b5569c06fec415 to your computer and use it in GitHub Desktop.
nftables nat masquerade configure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/sbin/nft -f | |
flush ruleset | |
table inet filter { | |
chain input { | |
type filter hook input priority 0; policy accept; | |
} | |
chain forward { | |
type filter hook forward priority 0; policy accept; | |
} | |
chain output { | |
type filter hook output priority 0; policy accept; | |
} | |
} | |
table ip nat { | |
chain prerouting { | |
type nat hook prerouting priority 0; policy accept; | |
} | |
chain postrouting { | |
type nat hook postrouting priority 0; policy accept; | |
masquerade | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment