command wireguard utilisee par le serveur jc et non plus l'ordi installant
This commit is contained in:
parent
19e0dc9c2f
commit
fca32d7f5c
@ -285,7 +285,7 @@ section "Creating wireguard conf"
|
|||||||
if [ -n "$wireguard_number" ] ; then
|
if [ -n "$wireguard_number" ] ; then
|
||||||
run cat >> "$mnt/etc/wireguard/jeancloud.conf" <<EOF
|
run cat >> "$mnt/etc/wireguard/jeancloud.conf" <<EOF
|
||||||
[Interface]
|
[Interface]
|
||||||
PrivateKey = $(wg genkey)
|
PrivateKey = $(chroot_run wg genkey)
|
||||||
ListenPort = 51812
|
ListenPort = 51812
|
||||||
Address = 10.98.1.$wireguard_number/32
|
Address = 10.98.1.$wireguard_number/32
|
||||||
|
|
||||||
@ -295,7 +295,7 @@ AllowedIPs = 10.98.1.254/32
|
|||||||
Endpoint = 193.33.56.94:51812
|
Endpoint = 193.33.56.94:51812
|
||||||
PersistentKeepalive = 25
|
PersistentKeepalive = 25
|
||||||
EOF
|
EOF
|
||||||
wireguard_pubkey="$(cat "$mnt/etc/wireguard/jeancloud.conf" | grep -oP '^PrivateKey = \K.*' | wg pubkey)"
|
wireguard_pubkey="$(cat "$mnt/etc/wireguard/jeancloud.conf" | grep -oP '^PrivateKey = \K.*' | chroot_run wg pubkey)"
|
||||||
|
|
||||||
run cat > "$secret_dir/wg_conf_part" <<EOF
|
run cat > "$secret_dir/wg_conf_part" <<EOF
|
||||||
[Peer] # $hostname
|
[Peer] # $hostname
|
||||||
|
Loading…
Reference in New Issue
Block a user