4 Let's assume that there is some insecure link between your computer and
5 WiFi-reachable gateway.
8 @item You have got @code{wlan0} NIC with 192.168.0/24 network on it.
9 @item You want to create virtual encrypted and authenticated 172.16.0/24
10 network and use it as a default transport.
11 @item @code{wlan0} MTU is 1500, 20 bytes overhead per IPv4. So MTU for
12 GoVPN is 1500 - 20 - 8 = 1472.
13 @item During startup client and server will say that TAP interface MTU
17 Do not forget about setting @code{GOMAXPROC} environment variable for
18 using more than one CPU.
20 GNU/Linux IPv4 client-server example:
23 server% echo "echo tap10" >> peers/CLIENTID/up.sh
24 server% ip addr add 192.168.0.1/24 dev wlan0
25 server% tunctl -t tap10
26 server% ip link set mtu 1432 dev tap10
27 server% ip addr add 172.16.0.1/24 dev tap10
28 server% ip link set up dev tap10
29 server% GOMAXPROC=4 govpn-server -bind 192.168.0.1:1194 -mtu 1472
34 client% echo MYLONG64HEXKEY > key.txt
35 client% ip addr add 192.168.0.2/24 dev wlan0
36 client% tunctl -t tap10
37 client% ip link set mtu 1432 dev tap10
38 client% ip addr add 172.16.0.2/24 dev tap10
39 client% ip link set up dev tap10
40 client% ip route add default via 172.16.0.1
41 client% export GOMAXPROC=4
43 govpn-client -key key.txt -id CLIENTID -iface tap10 \
44 -remote 192.168.0.1:1194 -mtu 1472
48 FreeBSD IPv6 client-server example:
51 server% ifconfig em0 inet6 fe80::1/64
52 server% GOMAXPROC=4 govpn-server -bind "fe80::1%em0"
56 client% ifconfig me0 inet6 -ifdisabled auto_linklocal
57 client% ifconfig tap10
58 client% ifconfig tap10 inet6 fc00::2/96 mtu 1412 up
59 client% route -6 add default fc00::1
60 client% export GOMAXPROC=4
62 govpn-client -key key.txt -id CLIENTID -iface tap10 \
63 -remote [fe80::1%me0]:1194