Created
December 26, 2024 17:22
-
-
Save jaredkrinke/6f31aaa030e08e6faf827322281125d4 to your computer and use it in GitHub Desktop.
Raspberry Pi as gateway, with static IPs (output interface is "wg0" in this example; replace `_` with `/` in filenames)
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
| interface eth0 | |
| static ip_address=172.16.0.1/24 |
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
| #!/bin/sh | |
| nft add table nat | |
| nft 'add chain nat postrouting { type nat hook postrouting priority 100 ; }' | |
| nft add rule nat postrouting ip saddr 172.16.0.0/24 oifname wg0 masquerade |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment