aboutsummaryrefslogtreecommitdiffstats
path: root/examples/source-router/init-lan/up
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2026-01-23 06:49:25 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2026-01-23 06:49:25 +0000
commit1aa3bc74170f10a4285827efa2748d1d6c2e4613 (patch)
tree3fc6b79944f119dddf85a1cf8758cfbbab607cbe /examples/source-router/init-lan/up
parent3c61b2916c56bfa8d3ce7a6a5480eb93c2ed1470 (diff)
downloads6-rc-1aa3bc74170f10a4285827efa2748d1d6c2e4613.tar.gz
New example batch of service definitions
Diffstat (limited to 'examples/source-router/init-lan/up')
-rw-r--r--examples/source-router/init-lan/up19
1 files changed, 19 insertions, 0 deletions
diff --git a/examples/source-router/init-lan/up b/examples/source-router/init-lan/up
new file mode 100644
index 0000000..c78d016
--- /dev/null
+++ b/examples/source-router/init-lan/up
@@ -0,0 +1,19 @@
+foreground { modprobe ppp_generic }
+foreground { ip addr add 127.0.0.1/8 dev lo }
+if { ip link set dev lo up }
+s6-envdir /etc/env-network
+if
+{
+ forx -Ep i { 0 1 2 3 }
+ importas -i ip4 ETH${i}_IP4
+ if { ip addr add ${ip4}/24 dev eth$i }
+ ip link set dev eth$i up
+}
+foreground { ip rule add fwmark 1 priority 32001 table 252 }
+foreground { ip rule del priority 32767 }
+multisubstitute
+{
+ importas -ui ETH2_IP4 ETH2_IP4
+ importas -ui ETH2_GW4 ETH2_GW4
+}
+ip route add default dev eth2 via ${ETH2_GW4} src ${ETH2_IP4}