Actualiser ansible/mkwgconf.sh

This commit is contained in:
uap33-2025-r 2024-11-14 16:51:29 +01:00
parent ea95044a7d
commit 77c6e532b3

View File

@ -2,17 +2,10 @@
set -u
set -e
<<<<<<< HEAD
AddressAwg=10.0.0.1/24 # Adresse VPN Wireguard extremite A
EndpointA=172.16.0.122 # Adresse extremite A
PortA=51820 # Port ecoute extremite A
AddressBwg=10.0.0.2/24 # Adresse VPN Wireguard extremite B
=======
AddressAwg=172.16.0.1/24 # Adresse VPN Wireguard extremite A
EndpointA=172.16.0.122 # Adresse extremite A
PortA=51820 # Port ecoute extremite A
AddressBwg=172.16.0.2/24 # Adresse VPN Wireguard extremite B
>>>>>>> d6e080d0145615056a7a0eb3d2f9e512809eb4f5
EndpointB=172.16.0.121 # Adresse extremite B
PortB=51820 # Port ecoute extremite B
@ -28,11 +21,7 @@ pKA=$(cat endpoint-a.pub)
PKB=$(cat endpoint-b.key)
pKB=$(cat endpoint-b.pub)
<<<<<<< HEAD
cat <<FINI > wg0-1.conf
=======
cat <<FINI > wg1-a.conf
>>>>>>> d6e080d0145615056a7a0eb3d2f9e512809eb4f5
# local settings for Endpoint A
[Interface]
PrivateKey = $PKA
@ -46,11 +35,7 @@ Endpoint = ${EndpointB}:$PortB
AllowedIPs = $AddressBwg
FINI
<<<<<<< HEAD
cat <<FINI > wg0-2.conf
=======
cat <<FINI > wg1-b.conf
>>>>>>> d6e080d0145615056a7a0eb3d2f9e512809eb4f5
# local settings for Endpoint B
[Interface]
PrivateKey = $PKB