From 12192865c3ca0e1c2139afabab508e0087b14982 Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Wed, 23 Feb 2022 20:19:37 -0500 Subject: Initial --- etc/local.d/00-net.start | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 etc/local.d/00-net.start (limited to 'etc/local.d/00-net.start') diff --git a/etc/local.d/00-net.start b/etc/local.d/00-net.start new file mode 100755 index 0000000..9c28f09 --- /dev/null +++ b/etc/local.d/00-net.start @@ -0,0 +1,21 @@ +#!/bin/sh +. /etc/local.d/vars.sh + +ip link set dev $wan address $wan_hwaddr +ip link set up $wan +udhcpc -b -i $wan + +# dhcpv6 +dhcpcd + +ip link set up $lan +ip -4 addr add $lan_ip/$lan_mask_bits dev $lan + +# We are indeed, a router. +sysctl -w net.ipv4.ip_forward=1 +# Even though we're a router, accept router advertisements anyway +sysctl -w net.ipv6.conf.all.accept_ra=2 +# IP Forwarding, but for ipv6 as well +sysctl -w net.ipv6.conf.all.forwarding=1 + +. /etc/local.d/vars_end.sh -- cgit v1.2.3