From a0d4c074c76f60da7efd46ccbbf77344ef0925bc Mon Sep 17 00:00:00 2001 From: root Date: Sat, 18 Nov 2017 20:58:41 +0100 Subject: [PATCH] Batman-Interface --- etc/network/interfaces.d/bat0 | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 etc/network/interfaces.d/bat0 diff --git a/etc/network/interfaces.d/bat0 b/etc/network/interfaces.d/bat0 new file mode 100644 index 0000000..195b15b --- /dev/null +++ b/etc/network/interfaces.d/bat0 @@ -0,0 +1,26 @@ + +#Freifunk Config +# device: bat0 +iface bat0 inet manual +post-up ifconfig $IFACE up + ##Einschalten post-up: + # IP des Gateways am B.A.T.M.A.N interface: + post-up ip addr add 10.50.96.1/21 dev $IFACE + # Regeln, wann die fff Routing-Tabelle benutzt werden soll: + post-up ip rule add iif $IFACE table fff + post-up ip rule add from 10.0.0.0/8 table fff + post-up ip rule add to 10.0.0.0/8 table fff + # Route in die Aschaffenburger Hood: +# post-up ip route add 10.50.96.0/21 dev $IFACE table fff + post-up ip route replace 10.50.96.0/21 dev $IFACE proto static table fff + # Start des DHCP Servers: + post-up invoke-rc.d isc-dhcp-server restart + + ##Ausschalten post-down: + # Loeschen von oben definieren Routen, Regeln und Interface: + post-down ip route del 10.50.96.0/21 dev $IFACE table fff + post-down ip rule del from 10.0.0.0/8 table fff + post-down ip rule del to 10.0.0.0/8 table fff + post-down ip rule del iif $IFACE table fff + post-down ifconfig $IFACE down +