mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-31 18:36:13 -05:00
14 lines
226 B
Bash
14 lines
226 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
set -eu
|
||
|
|
||
|
dev=vpn_wg0
|
||
|
|
||
|
ip link add dev "${dev}" type wireguard
|
||
|
wg setconf "${dev}" /etc/wireguard/wg.conf
|
||
|
ip link set dev "${dev}" up
|
||
|
|
||
|
for cidr in ${VPN_PEER_CIDRS}; do
|
||
|
ip route replace "${cidr}" dev "${dev}"
|
||
|
done
|