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 @strong{Install}. At first you must @ref{Installation, install} this
18 software: download, check the signature, compile.
20 Do not forget about setting @code{GOMAXPROC} environment variable for
21 using more than one CPU on both sides:
27 @strong{Prepare the server}. Create the new client, named (for example)
31 % ./utils/newclient.sh Alice
32 Place verifier to peers/6d4ac605ce8dc37c2f0bf21cb542a713/verifier
35 "6d4ac605ce8dc37c2f0bf21cb542a713" -- is the new client's identity.
37 @strong{Prepare the client}. Generate @ref{Verifier} for known client
41 % ./utils/storekey.sh /tmp/passphrase
42 Enter passphrase:[my secure passphrase is here]
43 % govpn-verifier -id 6d4ac605ce8dc37c2f0bf21cb542a713 -key /tmp/passphrase
44 562556cc9ecf0019b4cf45bcdf42706944ae9b3ac7c73ad299d83f2d5a169c55
48 "562556cc9ecf0019b4cf45bcdf42706944ae9b3ac7c73ad299d83f2d5a169c55" --
49 this is verifier itself.
51 @strong{Save verifier on server}.
54 % cat > peers/6d4ac605ce8dc37c2f0bf21cb542a713/verifier <<EOF
55 562556cc9ecf0019b4cf45bcdf42706944ae9b3ac7c73ad299d83f2d5a169c55
59 @strong{Prepare network on GNU/Linux IPv4 server}:
62 server% echo "echo tap10" >> peers/6d4ac605ce8dc37c2f0bf21cb542a713/up.sh
63 server% ip addr add 192.168.0.1/24 dev wlan0
64 server% tunctl -t tap10
65 server% ip link set mtu 1432 dev tap10
66 server% ip addr add 172.16.0.1/24 dev tap10
67 server% ip link set up dev tap10
70 @strong{Run server daemon itself}:
73 server% govpn-server -bind 192.168.0.1:1194 -mtu 1472
76 @strong{Prepare network on GNU/Linux IPv4 client}:
80 client% utils/storekey.sh key.txt
81 client% ip addr add 192.168.0.2/24 dev wlan0
82 client% tunctl -t tap10
83 client% ip link set mtu 1432 dev tap10
84 client% ip addr add 172.16.0.2/24 dev tap10
85 client% ip link set up dev tap10
86 client% ip route add default via 172.16.0.1
89 @strong{Run client daemon itself}:
91 client% govpn-client \
93 -id 6d4ac605ce8dc37c2f0bf21cb542a713 \
95 -remote 192.168.0.1:1194 \
99 @strong{FreeBSD IPv6 similar client-server example}:
102 server% ifconfig em0 inet6 fe80::1/64
103 server% govpn-server -bind "fe80::1%em0"
107 client% ifconfig me0 inet6 -ifdisabled auto_linklocal
108 client% ifconfig tap10
109 client% ifconfig tap10 inet6 fc00::2/96 mtu 1412 up
110 client% route -6 add default fc00::1
111 client% govpn-client \
113 -id 6d4ac605ce8dc37c2f0bf21cb542a713 \
115 -remote "[fe80::1%me0]":1194