Compare commits

...

1 Commits

Author SHA1 Message Date
eleonore12345
fca32d7f5c command wireguard utilisee par le serveur jc et non plus l'ordi installant 2024-06-20 10:15:44 +02:00

View File

@ -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