example config for ppoe router

hard cases make bad law
This commit is contained in:
Daniel Barlow
2023-02-25 23:12:55 +00:00
parent c37332910a
commit fe1b33f307
2 changed files with 231 additions and 0 deletions

16
nat.nft Normal file
View File

@@ -0,0 +1,16 @@
#!/usr/bin/nft -f
flush ruleset
table ip nat {
chain prerouting {
type nat hook prerouting priority 0; policy accept;
}
# for all packets to WAN, after routing, replace source address with primary IP of WAN interface
chain postrouting {
type nat hook postrouting priority 100; policy accept;
oifname "ppp0" masquerade
}
}