forked from freifunk-franken/firmware
11 lines
514 B
Plaintext
11 lines
514 B
Plaintext
if [ "$(uci -q get network.client.fff_snat)" = '1' ]; then
|
|
nft add table ip mangle
|
|
nft add chain ip mangle PREROUTING '{ type filter hook prerouting priority mangle; policy accept; }'
|
|
|
|
nft add table ip nat
|
|
nft add chain ip nat POSTROUTING '{ type nat hook postrouting priority srcnat; policy accept; }'
|
|
|
|
nft add rule ip mangle PREROUTING iifname "br-client" counter mark set 0x736e6174
|
|
nft add rule ip nat POSTROUTING meta mark 0x736e6174 counter snat ip to $(uci -q get network.client.fff_snat_sourceip)
|
|
fi
|