aboutsummaryrefslogtreecommitdiff
path: root/modules/private/vpn/tinc/tinc-up
blob: 26c1ec328fcc43993069ea875a507d341aa5a38f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env bash

echo 1 > /proc/sys/net/ipv6/conf/@mainInterface@/proxy_ndp
echo 1 > /proc/sys/net/ipv6/conf/all/forwarding

SUBNET=`getent hosts sn.vpn.immae.eu | head -n1 | cut -d' ' -f1`
GWIP=`getent hosts gw.vpn.immae.eu | head -n1 | cut -d' ' -f1`

ip -6 link set $INTERFACE up mtu 1280 txqueuelen 1000

ip -6 addr add $GWIP/96 dev $INTERFACE
ip -6 route add $SUBNET/80 dev $INTERFACE

ip neigh add proxy $GWIP dev @mainInterface@