freifunk: fix ip rules

This commit is contained in:
Astro 2021-04-30 00:08:49 +02:00
parent b7456776b0
commit a4b53d344d
1 changed files with 3 additions and 1 deletions

View File

@ -47,7 +47,9 @@ in {
# masquerading anything that isn't already their IP range
extraCommands = ''
${pkgs.iproute}/bin/ip rule del priority 300 || true
${pkgs.iproute}/bin/ip rule add to 10.200.0.0/16 table bmx priority 300
${pkgs.iproute}/bin/ip rule add to 10.200.0.0/16 table bmx_hosts priority 300
${pkgs.iproute}/bin/ip rule del priority 33000 || true
${pkgs.iproute}/bin/ip rule add table bmx_tuns priority 33000
${pkgs.iptables}/bin/iptables -t nat -F POSTROUTING
${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING \
\! --source 10.200.0.0/15 -o ${meshInterface} -j SNAT --to 10.200.${ddmeshAddrPart}