Created
September 17, 2024 13:19
-
-
Save zeroby0/8a91920102c0b2372fd7ff545943da92 to your computer and use it in GitHub Desktop.
my nftables conf to make devices connected via ethernet get internet via wifi. Remember to enable masquerading https://tailscale.com/kb/1103/exit-nodes?tab=linux
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 filter; | |
| } | |
| chain forward { | |
| type filter hook forward priority filter; | |
| } | |
| chain output { | |
| type filter hook output priority filter; | |
| } | |
| } | |
| table ip relay { | |
| chain forward { | |
| type filter hook forward priority filter; policy accept; | |
| iifname "enp6s0" oifname "wlp7s0" counter accept | |
| iifname "wlp7s0" oifname "enp6s0" ct state established,related counter accept | |
| } | |
| chain postrouting { | |
| type nat hook postrouting priority filter; policy accept; | |
| oifname "wlp7s0" counter masquerade | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment