persistent keepalive: enable in an example

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2016-07-08 12:36:04 +02:00
parent d81cafde7f
commit e2cc7743d5

View file

@ -9,7 +9,7 @@ IFS=: read -r status server_pubkey server_port internal_ip <&3
[[ $status == OK ]] [[ $status == OK ]]
ip link del dev wg0 2>/dev/null || true ip link del dev wg0 2>/dev/null || true
ip link add dev wg0 type wireguard ip link add dev wg0 type wireguard
wg set wg0 private-key /tmp/wg_private_key peer "$server_pubkey" allowed-ips 0.0.0.0/0 endpoint "demo.wireguard.io:$server_port" wg set wg0 private-key /tmp/wg_private_key peer "$server_pubkey" allowed-ips 0.0.0.0/0 endpoint "demo.wireguard.io:$server_port" persistent-keepalive 25
ip address add "$internal_ip"/24 dev wg0 ip address add "$internal_ip"/24 dev wg0
ip link set up dev wg0 ip link set up dev wg0
if [ "$1" == "default-route" ]; then if [ "$1" == "default-route" ]; then