[viirb] ping ipv6 address in vpn config for verification
This commit is contained in:
parent
ad480d2e7e
commit
cdfab448ac
1 changed files with 13 additions and 3 deletions
|
@ -3,17 +3,17 @@
|
|||
# See https://ungleich.ch/u/products/viirb-ipv6-box/
|
||||
|
||||
if [ $# -ne 3 ]; then
|
||||
echo "$0 viirb-id public-key your-dot-cdist [stages]"
|
||||
echo "$0 your-dot-cdist viirb-id public-key"
|
||||
echo " your-dot-cdist: path to YOUR ungleich-dot-cdist repo"
|
||||
echo " viirb-id: number in decimal format"
|
||||
echo " wireguard public key"
|
||||
echo " your-dot-cdist: path to YOUR ungleich-dot-cdist repo"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -x
|
||||
dot_cdist=$1; shift
|
||||
id=$1; shift
|
||||
public_key=$1; shift
|
||||
dot_cdist=$1; shift
|
||||
|
||||
hex_id=$(printf "%0.2x\n" "$id")
|
||||
viirb_hostname=viirb${id}
|
||||
|
@ -21,6 +21,9 @@ viirb_hostname=viirb${id}
|
|||
prefix_base=2a0a:e5c1:3
|
||||
my_prefix=${prefix_base}${hex_id}
|
||||
my_network=${my_prefix}::/48
|
||||
my_wireguard_ip=${my_prefix}::42
|
||||
my_lan_ip=${my_prefix}:cafe::42
|
||||
my_wifi_ip=${my_prefix}:7ea::42
|
||||
|
||||
vpn_endpoint_host=vpn-2a0ae5c1300.ungleich.ch
|
||||
|
||||
|
@ -50,3 +53,10 @@ git pull
|
|||
git push
|
||||
|
||||
cdist config -vv -j8 ${vpn_endpoint_host} -c ${dot_cdist}
|
||||
|
||||
# Test that the VPN connection is established
|
||||
sleep 10
|
||||
|
||||
ping -c3 ${my_wireguard_ip}
|
||||
ping -c3 ${my_lan_ip}
|
||||
ping -c3 ${my_wifi_ip}
|
||||
|
|
Loading…
Reference in a new issue