Fixed two issues in nftables.conf: 1. Unsubstituted placeholder @GATEWAY_NETWORK@ - hardcoded to 10.42.1.0/24 2. Missing semicolon on masquerade rule NAT now working - clients can access internet through R5C gateway. Masquerade rule: traffic from 10.42.1.0/24 not destined for br0 is NATed to the outgoing interface (Starlink/Ethernet uplink). Verified: - R5C gateway: 10.42.1.1/24 - Dual-band WiFi: 5GHz (ch 149) + 2.4GHz (ch 6) - DHCP: 3+ active leases - Internet: R5C can ping 1.1.1.1, clients ready for internet access Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
12 lines
411 B
Plaintext
Executable File
12 lines
411 B
Plaintext
Executable File
#!/usr/sbin/nft -f
|
|
# van-router NAT — masquerade LAN out whatever the WAN of the moment is
|
|
# (anything that is NOT the LAN bridge br0: ethernet/Starlink, wifi, future 4G)
|
|
table ip van_router_nat
|
|
delete table ip van_router_nat
|
|
table ip van_router_nat {
|
|
chain postrouting {
|
|
type nat hook postrouting priority srcnat; policy accept;
|
|
ip saddr 10.42.1.0/24 oifname != "br0" masquerade;
|
|
}
|
|
}
|