Signed-off-by: Sergey Matveev <stargrave@stargrave.org>
+@strong{Install}. At first you must @ref{Installation, install} this
+software: download, check the signature, compile.
+
Do not forget about setting @code{GOMAXPROC} environment variable for
using more than one CPU on both sides:
Do not forget about setting @code{GOMAXPROC} environment variable for
using more than one CPU on both sides:
% export GOMAXPROC=4
@end example
% export GOMAXPROC=4
@end example
-As a preparation you have to generate peer directory (register new
-client) on the server side using @code{utils/newsclient.sh}, generate
-@ref{Verifier} on client side and place it on the server:
+@strong{Prepare the server}. Create the new client, named (for example)
+"Alice":
-server% ./utils/newclient.sh Alice
+% ./utils/newclient.sh Alice
Place verifier to peers/6d4ac605ce8dc37c2f0bf21cb542a713/verifier
Place verifier to peers/6d4ac605ce8dc37c2f0bf21cb542a713/verifier
+@end example
+
+"6d4ac605ce8dc37c2f0bf21cb542a713" -- is the new client's identity.
-client% ./utils/storekey.sh /tmp/passphrase
+@strong{Prepare the client}. Generate @ref{Verifier} for known client
+identity:
+
+@example
+% ./utils/storekey.sh /tmp/passphrase
Enter passphrase:[my secure passphrase is here]
Enter passphrase:[my secure passphrase is here]
-client% govpn-verifier -id 6d4ac605ce8dc37c2f0bf21cb542a713 -key /tmp/passphrase
+% govpn-verifier -id 6d4ac605ce8dc37c2f0bf21cb542a713 -key /tmp/passphrase
562556cc9ecf0019b4cf45bcdf42706944ae9b3ac7c73ad299d83f2d5a169c55
562556cc9ecf0019b4cf45bcdf42706944ae9b3ac7c73ad299d83f2d5a169c55
-client% rm /tmp/passphrase
+% rm /tmp/passphrase
+@end example
+
+"562556cc9ecf0019b4cf45bcdf42706944ae9b3ac7c73ad299d83f2d5a169c55" --
+this is verifier itself.
-server% cat > peers/6d4ac605ce8dc37c2f0bf21cb542a713/verifier <<EOF
+@strong{Save verifier on server}.
+
+@example
+% cat > peers/6d4ac605ce8dc37c2f0bf21cb542a713/verifier <<EOF
562556cc9ecf0019b4cf45bcdf42706944ae9b3ac7c73ad299d83f2d5a169c55
EOF
@end example
562556cc9ecf0019b4cf45bcdf42706944ae9b3ac7c73ad299d83f2d5a169c55
EOF
@end example
-@code{6d4ac605ce8dc37c2f0bf21cb542a713} is your CLIENTID.
-
-GNU/Linux IPv4 client-server example:
+@strong{Prepare network on GNU/Linux IPv4 server}:
@example
server% echo "echo tap10" >> peers/6d4ac605ce8dc37c2f0bf21cb542a713/up.sh
@example
server% echo "echo tap10" >> peers/6d4ac605ce8dc37c2f0bf21cb542a713/up.sh
server% ip link set mtu 1432 dev tap10
server% ip addr add 172.16.0.1/24 dev tap10
server% ip link set up dev tap10
server% ip link set mtu 1432 dev tap10
server% ip addr add 172.16.0.1/24 dev tap10
server% ip link set up dev tap10
-server% GOMAXPROC=4 govpn-server -bind 192.168.0.1:1194 -mtu 1472
+@strong{Run server daemon itself}:
+
+@example
+server% govpn-server -bind 192.168.0.1:1194 -mtu 1472
+@end example
+
+@strong{Prepare network on GNU/Linux IPv4 client}:
+
@example
client% umask 066
client% utils/storekey.sh key.txt
@example
client% umask 066
client% utils/storekey.sh key.txt
client% ip addr add 172.16.0.2/24 dev tap10
client% ip link set up dev tap10
client% ip route add default via 172.16.0.1
client% ip addr add 172.16.0.2/24 dev tap10
client% ip link set up dev tap10
client% ip route add default via 172.16.0.1
-client% export GOMAXPROC=4
-client% while :; do
- govpn-client -key key.txt -id 6d4ac605ce8dc37c2f0bf21cb542a713 -iface tap10 \
- -remote 192.168.0.1:1194 -mtu 1472
-done
-FreeBSD IPv6 client-server example:
+@strong{Run client daemon itself}:
+@example
+client% govpn-client \
+ -key key.txt \
+ -id 6d4ac605ce8dc37c2f0bf21cb542a713 \
+ -iface tap10 \
+ -remote 192.168.0.1:1194 \
+ -mtu 1472
+@end example
+
+@strong{FreeBSD IPv6 similar client-server example}:
@example
server% ifconfig em0 inet6 fe80::1/64
@example
server% ifconfig em0 inet6 fe80::1/64
-server% GOMAXPROC=4 govpn-server -bind "fe80::1%em0"
+server% govpn-server -bind "fe80::1%em0"
client% ifconfig tap10
client% ifconfig tap10 inet6 fc00::2/96 mtu 1412 up
client% route -6 add default fc00::1
client% ifconfig tap10
client% ifconfig tap10 inet6 fc00::2/96 mtu 1412 up
client% route -6 add default fc00::1
-client% export GOMAXPROC=4
-client% while :; do
- govpn-client -key key.txt -id 6d4ac605ce8dc37c2f0bf21cb542a713 -iface tap10 \
- -remote [fe80::1%me0]:1194
-done
+client% govpn-client \
+ -key key.txt \
+ -id 6d4ac605ce8dc37c2f0bf21cb542a713 \
+ -iface tap10 \
+ -remote "[fe80::1%me0]":1194
@emph{govpn-client}, @emph{govpn-server}, @emph{govpn-verifier}
binaries will be build in the current directory.
@emph{govpn-client}, @emph{govpn-server}, @emph{govpn-verifier}
binaries will be build in the current directory.
+As a prerequisite you must install Go compiler and possibly TUN/TAP
+interfaces utilities:
+
+@itemize @bullet
+@item @code{lang/go} port in FreeBSD.
+@item @code{golang} and @code{uml-utilities} packages in GNU/Linux
+distributions.
+@end itemize
+
@example
% wget http://www.cypherpunks.ru/govpn/download/govpn-2.3.tar.xz
% wget http://www.cypherpunks.ru/govpn/download/govpn-2.3.tar.xz.sig
@example
% wget http://www.cypherpunks.ru/govpn/download/govpn-2.3.tar.xz
% wget http://www.cypherpunks.ru/govpn/download/govpn-2.3.tar.xz.sig