fff-ab-01/etc/network/interfaces.d/gre_fff-sw

35 lines
1.1 KiB
Plaintext
Raw Normal View History

2017-11-19 20:37:44 +01:00
#GRE-Tunnel zu fff-sw
#
#Robert Langhammer (rola)
#Max Wohlfart (Moexe)
#
#fff-sw
# öffentlich: 46.4.85.158
# freifunk: 10.50.252.8
#fff-ab-01
# öffentlich: 5.189.177.88
# freifunk: 10.50.252.161
2017-11-18 21:00:18 +01:00
auto fff-sw
iface fff-sw inet static
address 10.50.252.161
pre-up iptunnel add $IFACE mode gre remote 46.4.85.158 local 5.189.177.88 ttl 255
up ifconfig $IFACE multicast
pointopoint 10.50.252.8
post-up iptables -t mangle -A POSTROUTING -p tcp --tcp-flags SYN,RST SYN -o $IFACE -j TCPMSS --clamp-mss-to-pmtu
post-up ip rule add iif $IFACE table fff
post-up ip rule add from 10.50.0.0/16 table fff
post-up ip rule add to 10.50.0.0/16 table fff
post-up ip -6 addr flush dev $IFACE
# post-up ip -6 addr add fe80::babe:1:4/64 dev $IFACE
post-up ip -6 addr add fe80::1983:1:4/64 dev $IFACE
# post-up ip -6 addr add fe80::1985/64 dev $IFACE
post-down ip rule del iif $IFACE table fff
post-down ip rule del from 10.50.0.0/16 table fff
post-down ip rule del to 10.50.0.0/16 table fff
post-down iptables -t mangle -D POSTROUTING -p tcp --tcp-flags SYN,RST SYN -o $IFACE -j TCPMSS --clamp-mss-to-pmtu
post-down iptunnel del $IFACE