From a4a4872a75a9fabcb732e67ebe8834a82162feab Mon Sep 17 00:00:00 2001 From: root Date: Tue, 8 Feb 2022 08:44:19 +0100 Subject: [PATCH] configuration wireguard --- wireguard/truc.sh | 6687 ++++++++++++++++++++++++++++++++++++++++++ wireguard/wg0-b.conf | 11 + wireguard/wg0.conf | 11 + 3 files changed, 6709 insertions(+) create mode 100644 wireguard/truc.sh create mode 100644 wireguard/wg0-b.conf create mode 100644 wireguard/wg0.conf diff --git a/wireguard/truc.sh b/wireguard/truc.sh new file mode 100644 index 0000000..c5890f2 --- /dev/null +++ b/wireguard/truc.sh @@ -0,0 +1,6687 @@ +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=192.168.1.81 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI +#!/bin/bash +set -u +set -e + +AddressAwg=10.0.0.1/32 # Adresse VPN Wireguard extremite A +EndpointA=10.121.38.68 # Adresse extremite A +PortA=51820 # Port ecoute extremite A +AddressBwg=10.0.0.2/32 # Adresse VPN Wireguard extremite B +EndpointB=192.168.1.82 # Adresse extremite B +PortB=51820 # Port ecoute extremite B + +umask 077 ; +wg genkey > endpoint-a.key +wg pubkey < endpoint-a.key > endpoint-a.pub + +wg genkey > endpoint-b.key +wg pubkey < endpoint-b.key > endpoint-b.pub + +PKA=$(cat endpoint-a.key) +pKA=$(cat endpoint-a.pub) +PKB=$(cat endpoint-b.key) +pKB=$(cat endpoint-b.pub) + +cat < wg0-a.conf +# local settings for Endpoint A +[Interface] +PrivateKey = $PKA +Address = $AddressAwg +ListenPort = $PortA + +# remote settings for Endpoint B +[Peer] +PublicKey = $pKB +#Endpoint = ${EndpointB}:$PortB +AllowedIPs = $AddressBwg +FINI + + +cat < wg0-b.conf +# local settings for Endpoint B +[Interface] +PrivateKey = $PKB +Address = $AddressBwg +ListenPort = $PortB + +# remote settings for Endpoint A +[Peer] +PublicKey = $pKA +Endpoint = ${EndpointA}:$PortA +AllowedIPs = $AddressAwg +FINI + diff --git a/wireguard/wg0-b.conf b/wireguard/wg0-b.conf new file mode 100644 index 0000000..44343e7 --- /dev/null +++ b/wireguard/wg0-b.conf @@ -0,0 +1,11 @@ +# local settings for Endpoint B +[Interface] +PrivateKey = 0Nb+sT20LbiRTMk4Ll5FsASVSFTgdA+JyMpd8shxJFA= +Address = 10.0.0.2/32 +ListenPort = 51820 + +# remote settings for Endpoint A +[Peer] +PublicKey = uKQUgVq/uud3tIV2Qibth/8YHzDL2Z0SmcsnC+LkAms= +Endpoint = 10.121.38.68:51820 +AllowedIPs = 10.0.0.1/32 diff --git a/wireguard/wg0.conf b/wireguard/wg0.conf new file mode 100644 index 0000000..33cf524 --- /dev/null +++ b/wireguard/wg0.conf @@ -0,0 +1,11 @@ +# local settings for Endpoint A +[Interface] +PrivateKey = kBAtNXmiZU6jVUeAKKoooTd8q5rN7lXpJJLVlEgSlWQ= +Address = 10.0.0.1/32 +ListenPort = 51820 + +# remote settings for Endpoint B +[Peer] +PublicKey = NEWioueQlPkKT4zOoIhmiQi30lV1aJ3gnG69m4T4Ezg= +#Endpoint = 192.168.1.82:51820 +AllowedIPs = 10.0.0.2/32