Housekeeping
|
|
@ -1,10 +0,0 @@
|
|||
[RB5009-WG1]
|
||||
RtrInterface=WG1
|
||||
Rtr_Addr_Admin=10.1.8.99
|
||||
Rtr_Addr_Public=205.151.68.129
|
||||
Rrt_Port=13243
|
||||
Rtr_Addr_Private=10.1.4.254
|
||||
Rtr_CIDR_Mask=24
|
||||
Rtr_PUB_KEY=bTatsa66Ggasasa6666=
|
||||
Rtr_DNS=1.1.1.1,1.0.0.1
|
||||
Rtr_Route_Subnet=10.0.0.0/8
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
/interface wireguard peers
|
||||
add allowed-address=10.1.4.1/32 disabled=no name="marc" interface=WG1 \
|
||||
preshared-key="aeN5oZSTW//CPRuZaBj16GTwx7+ktpvph+thrFY/WQc=" public-key="ztXlaxlZWA4oZxSCaQsN/8RXqahEeF4BehMjfAFbLVk="
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
[Interface]
|
||||
PrivateKey = 2OchuWPpq3g8dXCoo2uufnmU1dpcd8WfgS4/7vI7tUQ=
|
||||
ListenPort = 51821
|
||||
Address = 10.1.4.1/32
|
||||
DNS = 1.1.1.1,1.0.0.1
|
||||
|
||||
[Peer]
|
||||
PublicKey = bTatsa66Ggasasa6666=
|
||||
PresharedKey = aeN5oZSTW//CPRuZaBj16GTwx7+ktpvph+thrFY/WQc=
|
||||
AllowedIPs = 10.0.0.0/8
|
||||
Endpoint = 205.151.68.129:13243
|
||||
PersistentKeepalive = 25
|
||||
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
|
|
@ -1,3 +0,0 @@
|
|||
/interface wireguard peers
|
||||
add allowed-address=10.1.4.2/32 disabled=no name="guy" interface=WG1 \
|
||||
preshared-key="JVdiKw9rvvz/HqTdHG6oxJBkduUe3r7DWgqDO0tHMkw=" public-key="eeYn9g9ayNJoEkYH4HrXFMcGDU0uUHLXF2ZopybCAFg="
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
[Interface]
|
||||
PrivateKey = ABcaGRdchXN2+23PoSe8d7ojH4WhT4JEsZLRV3Jt1lo=
|
||||
ListenPort = 51821
|
||||
Address = 10.1.4.2/32
|
||||
DNS = 1.1.1.1,1.0.0.1
|
||||
|
||||
[Peer]
|
||||
PublicKey = bTatsa66Ggasasa6666=
|
||||
PresharedKey = JVdiKw9rvvz/HqTdHG6oxJBkduUe3r7DWgqDO0tHMkw=
|
||||
AllowedIPs = 10.0.0.0/8
|
||||
Endpoint = 205.151.68.129:13243
|
||||
PersistentKeepalive = 25
|
||||
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
|
|
@ -1,3 +0,0 @@
|
|||
[Interface]
|
||||
ListenPort = 13231
|
||||
PrivateKey = oIdmd/wFdL54lgkkThbIcDAeg9nKmS5wxH4fLBJbwEo=
|
||||
|
|
@ -1 +0,0 @@
|
|||
mCscj1wPL4+kGrDMAKY3Ek8drGvxcgOlfudGAq9j+Vo=
|
||||
|
|
@ -1 +0,0 @@
|
|||
pWs3b9kfSZ+Uvg7Q9tYT52Lqxh7OEbOhkzmvE0NT/GM=
|
||||
|
|
@ -1 +0,0 @@
|
|||
GPBSyPyU06/jsowN9ScTpXDkMAzrGxKB217gVWcSVng=
|
||||
|
|
@ -1 +0,0 @@
|
|||
+tJsNqiNzwJ7PCLRvF83olIffVq9FAWSvOlYC7wbUp0=
|
||||
|
|
@ -1 +0,0 @@
|
|||
rtbXn9kJ32AqTbOeNcQjWT31UW+508ENhP1+Whez5TQ=
|
||||
|
|
@ -1 +0,0 @@
|
|||
APeJ2lVKE90EUHsDO+bYC5OAnpeUATCeGZWDL9K0dVM=
|
||||
|
|
@ -1 +0,0 @@
|
|||
isW7BmJAwEq6B2PeDbG4sN8z/dg2zfuhuLdPQY3WovU=
|
||||
|
|
@ -1 +0,0 @@
|
|||
GkRup6bdiXqb8GOaytLBQ1tFcQJ+SEu+KgkQlR17oE4=
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
[Interface]
|
||||
PrivateKey = GPBSyPyU06/jsowN9ScTpXDkMAzrGxKB217gVWcSVng=
|
||||
Address = 172.16.28.1/32
|
||||
DNS = 1.1.1.1,8.8.8.8
|
||||
|
||||
[Peer]
|
||||
PublicKey = rtbXn9kJ32AqTbOeNcQjWT31UW+508ENhP1+Whez5TQ=
|
||||
PresharedKey = +tJsNqiNzwJ7PCLRvF83olIffVq9FAWSvOlYC7wbUp0=
|
||||
Endpoint = 172.16.24.1:13239
|
||||
AllowedIPs = 0.0.0.0/0,::/0
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
[Interface]
|
||||
PrivateKey = APeJ2lVKE90EUHsDO+bYC5OAnpeUATCeGZWDL9K0dVM=
|
||||
Address = 172.16.28.2/32
|
||||
DNS = 1.1.1.1,8.8.8.8
|
||||
|
||||
[Peer]
|
||||
PublicKey = 3ZnjnM9d/TL2MoNnEgNRlDztYEhHLNjb8EXai9utzCk=
|
||||
PresharedKey = isW7BmJAwEq6B2PeDbG4sN8z/dg2zfuhuLdPQY3WovU=
|
||||
Endpoint = 192.168.88.168:13239
|
||||
AllowedIPs = 0.0.0.0/0
|
||||
|
|
@ -1,316 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
|
||||
#=================== Environment ===============================================
|
||||
#
|
||||
ScriptName=$(basename "$0")
|
||||
SshUser=ansible
|
||||
#SshKey="/home/wireguard/.ssh/ansible_evoq_rsa"
|
||||
SshKey="/home/boig01/.ssh/ansible_evoq_rsa"
|
||||
#BaseDir="/home/wireguard"
|
||||
BaseDir="/dev/shm"
|
||||
CCR1=10.1.8.11
|
||||
CCR2=10.1.8.12
|
||||
Version=240222_1842
|
||||
CORP="EVOQ"
|
||||
TmpUserList=$(mktemp -p /dev/shm)
|
||||
|
||||
# Wireguard For Routers
|
||||
RtrCCR1Int=WG-Routers
|
||||
RtrCCR1PubKey="9au45IDNJhHDNtN+LIpJDyMFTEYdN9WOSSHEJS8WRmw="
|
||||
RtrCCR1Prefix="10.1.32"
|
||||
RtrCCR1Address="10.1.32.254/24"
|
||||
RtrCCR1Port=13232
|
||||
WgRtrDir="${BaseDir}/routers"
|
||||
|
||||
# Wireguard For Users
|
||||
UsrCCR1Int=WG-Users
|
||||
UsrCCR1PubKey="EsxauwYNBotyfDJzy9yCUXDci2gHbtZLhUWnMgMP0AY="
|
||||
UsrCCR1Prefix="10.1.33"
|
||||
UsrCCR1Address="10.1.33.254/24"
|
||||
UsrCCR1Port=13233
|
||||
WgUsrDir="${BaseDir}/users"
|
||||
|
||||
YELLOW='\033[0;33m'
|
||||
GREEN='\033[0;32m'
|
||||
RED='\033[0;31m'
|
||||
BLUE='\033[0;34m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
|
||||
# Create paths if not there
|
||||
[ ! -d "$WgRtrDir" ] && mkdir -p "${WgRtrDir}"
|
||||
[ ! -d "$WgUsrDir" ] && mkdir -p "${WgUsrDir}"
|
||||
|
||||
|
||||
|
||||
#=================== function Info =============================================
|
||||
#
|
||||
# Avec date / time prefix
|
||||
#
|
||||
Info() { printf "${GREEN} %s ${NC} %s\n" "$( date +%F_%T )" "$*" >&2; } # send to stderr
|
||||
|
||||
|
||||
#=================== function Message ==========================================
|
||||
#
|
||||
Message() { printf "${GREEN}%s ${NC}\n" "$*" ;} # send to stderr
|
||||
|
||||
|
||||
|
||||
#=================== function Help =============================================
|
||||
#
|
||||
function Help ()
|
||||
{
|
||||
echo -e "
|
||||
usage: $ScriptName [options]
|
||||
|
||||
-l List WireGuard clients on CCR1
|
||||
-h This help
|
||||
|
||||
"
|
||||
}
|
||||
|
||||
|
||||
#=================== function addCCR1 ==========================================
|
||||
#
|
||||
function addCCR1() {
|
||||
local Router="$1"
|
||||
echo -e "\nAdding ${Router} Wireguard account to CCR1..."
|
||||
ssh -i ${SSHKey} ansible@${CCR1} "/ppp secret add local-address=10.1.31.254 name=${Router} password=${L2TPPass} remote-address=${CCRSideIP} routes=\"${ip_Subnet} $CCRSideIP 1\" service=l2tp"
|
||||
|
||||
if [ $? = 0 ]
|
||||
then
|
||||
echo "${Router} Wireguard account successfully added to CCR1"
|
||||
else
|
||||
echo "Failed to add ${Router} Wireguard account to CCR1"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#=================== function newClient =======================================
|
||||
#
|
||||
function newClient() {
|
||||
ENDPOINT="${SERVER_PUB_IP}:${SERVER_PORT}"
|
||||
|
||||
echo ""
|
||||
echo "Tell me a name for the client."
|
||||
echo "The name must consist of alphanumeric character. It may also include an underscore or a dash and can't exceed 15 chars."
|
||||
|
||||
until [[ ${CLIENT_NAME} =~ ^[a-zA-Z0-9_-]+$ && ${CLIENT_EXISTS} == '0' && ${#CLIENT_NAME} -lt 16 ]]; do
|
||||
read -rp "Client name: " -e CLIENT_NAME
|
||||
CLIENT_EXISTS=$(grep -c -E "^### Client ${CLIENT_NAME}\$" "$(pwd)/wireguard/${SERVER_WG_NIC}/${SERVER_WG_NIC}.conf")
|
||||
|
||||
if [[ ${CLIENT_EXISTS} == '1' ]]; then
|
||||
echo ""
|
||||
echo "A client with the specified name was already created, please choose another name."
|
||||
echo ""
|
||||
fi
|
||||
done
|
||||
|
||||
for DOT_IP in {2..254}; do
|
||||
DOT_EXISTS=$(grep -c "${SERVER_WG_IPV4::-1}${DOT_IP}" "$(pwd)/wireguard/${SERVER_WG_NIC}/${SERVER_WG_NIC}.conf")
|
||||
if [[ ${DOT_EXISTS} == '0' ]]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ ${DOT_EXISTS} == '1' ]]; then
|
||||
echo ""
|
||||
echo "The subnet configured supports only 253 clients."
|
||||
exit 99
|
||||
fi
|
||||
|
||||
BASE_IP=$(echo "$SERVER_WG_IPV4" | awk -F '.' '{ print $1"."$2"."$3 }')
|
||||
until [[ ${IPV4_EXISTS} == '0' ]]; do
|
||||
read -rp "Client's WireGuard IPv4: ${BASE_IP}." -e -i "${DOT_IP}" DOT_IP
|
||||
CLIENT_WG_IPV4="${BASE_IP}.${DOT_IP}"
|
||||
IPV4_EXISTS=$(grep -c "$CLIENT_WG_IPV4/24" "$(pwd)/wireguard/${SERVER_WG_NIC}/${SERVER_WG_NIC}.conf")
|
||||
|
||||
if [[ ${IPV4_EXISTS} == '1' ]]; then
|
||||
echo ""
|
||||
echo "A client with the specified IPv4 was already created, please choose another IPv4."
|
||||
echo ""
|
||||
fi
|
||||
done
|
||||
|
||||
BASE_IP=$(echo "$SERVER_WG_IPV6" | awk -F '::' '{ print $1 }')
|
||||
until [[ ${IPV6_EXISTS} == '0' ]]; do
|
||||
read -rp "Client's WireGuard IPv6: ${BASE_IP}::" -e -i "${DOT_IP}" DOT_IP
|
||||
CLIENT_WG_IPV6="${BASE_IP}::${DOT_IP}"
|
||||
IPV6_EXISTS=$(grep -c "${CLIENT_WG_IPV6}/64" "$(pwd)/wireguard/${SERVER_WG_NIC}/${SERVER_WG_NIC}.conf")
|
||||
|
||||
if [[ ${IPV6_EXISTS} == '1' ]]; then
|
||||
echo ""
|
||||
echo "A client with the specified IPv6 was already created, please choose another IPv6."
|
||||
echo ""
|
||||
fi
|
||||
done
|
||||
|
||||
# Generate key pair for the client
|
||||
CLIENT_PRIV_KEY=$(wg genkey)
|
||||
CLIENT_PUB_KEY=$(echo "${CLIENT_PRIV_KEY}" | wg pubkey)
|
||||
CLIENT_PRE_SHARED_KEY=$(wg genpsk)
|
||||
|
||||
mkdir -p "$(pwd)/wireguard/${SERVER_WG_NIC}/client/${CLIENT_NAME}" >/dev/null 2>&1
|
||||
HOME_DIR="$(pwd)/wireguard/${SERVER_WG_NIC}/client/${CLIENT_NAME}"
|
||||
|
||||
# Create client file and add the server as a peer
|
||||
echo "[Interface]
|
||||
PrivateKey = ${CLIENT_PRIV_KEY}
|
||||
Address = ${CLIENT_WG_IPV4}/32,${CLIENT_WG_IPV6}/128
|
||||
DNS = ${CLIENT_DNS_1},${CLIENT_DNS_2}
|
||||
|
||||
[Peer]
|
||||
PublicKey = ${SERVER_PUB_KEY}
|
||||
PresharedKey = ${CLIENT_PRE_SHARED_KEY}
|
||||
Endpoint = ${ENDPOINT}
|
||||
AllowedIPs = 0.0.0.0/0,::/0" >>"${HOME_DIR}/${SERVER_WG_NIC}-client-${CLIENT_NAME}.conf"
|
||||
|
||||
# Add the client as a peer to the MikroTik (to client folder)
|
||||
echo "# WireGuard client peer configure
|
||||
/interface wireguard peers
|
||||
add allowed-address=${CLIENT_WG_IPV4}/32 comment=\\
|
||||
${SERVER_WG_NIC}-client-${CLIENT_NAME} interface=${SERVER_WG_NIC} \\
|
||||
preshared-key=\"${CLIENT_PRE_SHARED_KEY}\" public-key=\\
|
||||
\"${CLIENT_PUB_KEY}\"
|
||||
" >"${HOME_DIR}/mikrotik-peer-${SERVER_WG_NIC}-client-${CLIENT_NAME}.rsc"
|
||||
|
||||
# Add the client as a peer to the MikroTik
|
||||
echo "# WireGuard client peer configure
|
||||
/interface wireguard peers
|
||||
add allowed-address=${CLIENT_WG_IPV4}/32 comment=\\
|
||||
${SERVER_WG_NIC}-client-${CLIENT_NAME} interface=${SERVER_WG_NIC} \\
|
||||
preshared-key=\"${CLIENT_PRE_SHARED_KEY}\" public-key=\\
|
||||
\"${CLIENT_PUB_KEY}\"
|
||||
" >> "$(pwd)/wireguard/${SERVER_WG_NIC}/mikrotik/${SERVER_WG_NIC}.rsc"
|
||||
|
||||
# Add the client as a peer to the server
|
||||
echo -e "\n### Client ${CLIENT_NAME}
|
||||
[Peer]
|
||||
PublicKey = ${CLIENT_PUB_KEY}
|
||||
PresharedKey = ${CLIENT_PRE_SHARED_KEY}
|
||||
AllowedIPs = ${CLIENT_WG_IPV4}/32,${CLIENT_WG_IPV6}/128" >>"$(pwd)/wireguard/${SERVER_WG_NIC}/${SERVER_WG_NIC}.conf"
|
||||
|
||||
echo -e "\nHere is your client config file as a QR Code:"
|
||||
|
||||
qrencode -t ansiutf8 -l L <"${HOME_DIR}/${SERVER_WG_NIC}-client-${CLIENT_NAME}.conf"
|
||||
qrencode -l L -s 6 -d 225 -o "${HOME_DIR}/${SERVER_WG_NIC}-client-${CLIENT_NAME}.png" <"${HOME_DIR}/${SERVER_WG_NIC}-client-${CLIENT_NAME}.conf"
|
||||
|
||||
echo -e "${INFO} Config available in ${HOME_DIR}/${SERVER_WG_NIC}-client-${CLIENT_NAME}.conf"
|
||||
echo -e "${INFO} QR is also available in ${HOME_DIR}/${SERVER_WG_NIC}-client-${CLIENT_NAME}.png"
|
||||
echo -e "${INFO} MikroTik peer config available in ${HOME_DIR}/mikrotik-${SERVER_WG_NIC}-client-${CLIENT_NAME}.rsc"
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#=================== function manageMenu ======================================
|
||||
#
|
||||
function manageMenu() {
|
||||
echo ""
|
||||
echo "It looks like this WireGuard interface is already."
|
||||
echo ""
|
||||
echo "What do you want to do?"
|
||||
echo " 1) Add a new client"
|
||||
echo " 2) Exit"
|
||||
until [[ ${MENU_OPTION} =~ ^[1-4]$ ]]; do
|
||||
read -rp "Select an option [1-2]: " MENU_OPTION
|
||||
done
|
||||
case "${MENU_OPTION}" in
|
||||
1)
|
||||
newClient
|
||||
;;
|
||||
2)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
|
||||
#=================== function listConfs =======================================
|
||||
#
|
||||
function listConfs() {
|
||||
local directory
|
||||
directory="$(pwd)/wireguard"
|
||||
|
||||
if [ -d "${directory}" ]; then
|
||||
echo "List of existing configurations:"
|
||||
i=1
|
||||
for folder in "${directory}"/*/; do
|
||||
local users count folder_name
|
||||
users="${folder}/client/"
|
||||
count=$(find "$users" -maxdepth 1 -mindepth 1 -type d 2>/dev/null | wc -l)
|
||||
folder_name=$(basename "${folder}")
|
||||
echo "${i}. ${folder_name} [${count} user(s)]"
|
||||
((i++))
|
||||
done
|
||||
fi
|
||||
echo ""
|
||||
}
|
||||
|
||||
|
||||
#=================== function listCCR1 =========================================
|
||||
#
|
||||
# Filter 1: enlever les ";" et remplacer ^m par LF
|
||||
# Filter 2: Grouper 2 lignes consecutives
|
||||
# Filter 3: Print field #4 et #3
|
||||
#
|
||||
function ListCCR() {
|
||||
|
||||
Message "User List"
|
||||
ssh -i $SshKey ${SshUser}@${CCR1} "/interface/wireguard/peers/print proplist=comment,interface" \
|
||||
| grep User | tr -d ";" | sed -e "s/\r//g" \
|
||||
| awk 'NR%2 {printf("%s ", $0); next} {print $0}' \
|
||||
| awk '{print $4, $3}' | tee ${TmpUserList}
|
||||
|
||||
LastEntry=$(cat ${TmpUserList} | sort -r | head -1 | awk '{ print $1 }')
|
||||
NextEntry=$(($LastEntry+1))
|
||||
echo -e "
|
||||
Last Entry = $LastEntry
|
||||
Next Entry = $NextEntry
|
||||
"
|
||||
}
|
||||
|
||||
|
||||
#=================== MAIN =====================================================
|
||||
#
|
||||
echo -e "\nWireGuard-MikroTik ${BLUE}${CORP}${NC} configurator\n"
|
||||
|
||||
((!$#)) && Help && exit
|
||||
|
||||
|
||||
while getopts cfhl option
|
||||
do
|
||||
case "${option}" in
|
||||
c) BoolCreate=1 ;;
|
||||
f) VarFileLog=1;;
|
||||
h) Help
|
||||
exit 0;;
|
||||
l) ListCCR ;;
|
||||
*) Help
|
||||
exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
rm -f ${TmpUserList}
|
||||
exit
|
||||
|
||||
#? Check for root, OS, WireGuard
|
||||
installCheck
|
||||
|
||||
listConfs
|
||||
|
||||
#? Check server exist
|
||||
serverName
|
||||
|
||||
#? Check if WireGuard is already installed and load params
|
||||
if [[ -e $(pwd)/wireguard/${SERVER_WG_NIC}/params ]]; then
|
||||
# shellcheck source=/dev/null
|
||||
source "$(pwd)/wireguard/${SERVER_WG_NIC}/params"
|
||||
manageMenu
|
||||
else
|
||||
newInterface
|
||||
fi
|
||||
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
/ip address add address=172.14.40.004/32 comment=WG-CTG interface=wg-ctg
|
||||
/interface wireguard peers add allowed-address=172.16.254.004/32 client-keepalive=10 disabled=no comment="2" \
|
||||
interface=WG-Devices preshared-key="efrLuDEVeDNpj13qlIqbjCiKlPVxE8T+hLt+2gQHF40=" public-key="lRlZ5uUBQsCH4G259f+q2yKAH4rxc2y+KHDlHaksmwo="
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
|
||||
[WG3]
|
||||
Rtr_Addr_Admin=172.16.1.1
|
||||
Rtr_Addr_Public=ingt.dyndns.org
|
||||
Rrt_Port=14322
|
||||
Rtr_Addr_Private=172.16.253.254
|
||||
Rtr_CIDR_Mask=24
|
||||
Rtr_PUB_KEY=vH29JWx4oamEfJFSOGQspPtHmMuLY1lC5jiFsgu6hio=
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
/interface wireguard peers
|
||||
add allowed-address=172.16.253.1/32 disabled=no name="zbook" interface=WG3 \
|
||||
preshared-key="phF3M7QpL+jrxsVZ3guV+SRGFohoTdiNjX/VntDJMS8=" public-key="LzC8W/ChD8Iq7kDJ7F796WRzqPSI30bAKbnJraZ59gE="
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
[Interface]
|
||||
PrivateKey = 2J4fFcuD/cuhk8FcO9iqTfDdhsZADR6/qxFbL00DF3M=
|
||||
ListenPort = 51821
|
||||
Address = 172.16.253.1/32
|
||||
DNS = 1.1.1.1,8.8.8.8
|
||||
|
||||
[Peer]
|
||||
PublicKey = vH29JWx4oamEfJFSOGQspPtHmMuLY1lC5jiFsgu6hio=
|
||||
PresharedKey = phF3M7QpL+jrxsVZ3guV+SRGFohoTdiNjX/VntDJMS8=
|
||||
AllowedIPs = 0.0.0.0/0
|
||||
Endpoint = ingt.dyndns.org:14322
|
||||
PersistentKeepalive = 25
|
||||
|
||||
|
Before Width: | Height: | Size: 1.4 KiB |
|
|
@ -1,3 +0,0 @@
|
|||
/interface wireguard peers
|
||||
add allowed-address=10.8.38.1/32 disabled=no comment="User Real" interface=wg1 \
|
||||
preshared-key="3v+2iZ8UNS6YHKYc55fVgI77wtfRO0JCa4X2bIc34e4=" public-key="T8N9Zdy4JiStBIJI00T9fkIx6KzatLkQ/WXQUDe7QDU="
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
[Interface]
|
||||
PrivateKey = IFR3761g8AM2F1ICp+hP9TyudinHHXio0BvPFUOa/3o=
|
||||
ListenPort = 51821
|
||||
Address = 10.8.38.1/32
|
||||
DNS = 10.8.38.1,1.1.1.1
|
||||
|
||||
[Peer]
|
||||
PublicKey = ywl8GMIFJZlElELbvIPHEzs8/T5VaF9+gaq17JaXThE=
|
||||
PresharedKey = 3v+2iZ8UNS6YHKYc55fVgI77wtfRO0JCa4X2bIc34e4=
|
||||
AllowedIPs = 10.8.0.0/16
|
||||
Endpoint = 199.168.223.11:13233
|
||||
PersistentKeepalive = 25
|
||||
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
/interface wireguard peers
|
||||
add allowed-address=10.8.38.2/32 disabled=no comment="User Ariel" interface=wg1 \
|
||||
preshared-key="cHKDiUAezRuelDtTkbA9pNwzX3kwM7hhG6XB2/MWrkY=" public-key="mQcmO5hLoAXNA3KeF+iXydsZuDg+nkbYNsogvJ32mVs="
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
[Interface]
|
||||
PrivateKey = wL/hWyRZtifMLVEgPc31VMmG1+7EYbm5wJI5uxbF+34=
|
||||
ListenPort = 51821
|
||||
Address = 10.8.38.2/32
|
||||
DNS = 10.8.38.1,1.1.1.1
|
||||
|
||||
[Peer]
|
||||
PublicKey = zHfHRbQs+3WH9GHBEH7dsh8J0xxLkP2OxWJASV+VWlw=
|
||||
PresharedKey = cHKDiUAezRuelDtTkbA9pNwzX3kwM7hhG6XB2/MWrkY=
|
||||
AllowedIPs = 10.8.0.0/16
|
||||
Endpoint = 199.168.223.11:13233
|
||||
PersistentKeepalive = 25
|
||||
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
/interface wireguard peers
|
||||
add allowed-address=10.8.38.3/32 disabled=no comment="User Guy" interface=wg1 \
|
||||
preshared-key="wF6cwKPq7Yu9tifDy1zPYZ4t+GGXsh6QaJiKwhoYPVA=" public-key="W+1qr4Un3+u0i9bNmItllu3FrY49+NNX9aQfYmVkm1Q="
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
[Interface]
|
||||
PrivateKey = 2FvyrN30+4CHTmeJInGRcILPCCVovO1hiYL5+qvYp3M=
|
||||
ListenPort = 51821
|
||||
Address = 10.8.38.3/32
|
||||
DNS = 10.8.38.254,1.1.1.1
|
||||
|
||||
[Peer]
|
||||
PublicKey = ywl8GMIFJZlElELbvIPHEzs8/T5VaF9+gaq17JaXThE=
|
||||
PresharedKey = wF6cwKPq7Yu9tifDy1zPYZ4t+GGXsh6QaJiKwhoYPVA=
|
||||
AllowedIPs = 10.8.0.0/16
|
||||
Endpoint = 199.168.223.11:13233
|
||||
PersistentKeepalive = 25
|
||||
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
[CCR1016]
|
||||
RtrInterface=WG-Users
|
||||
Rtr_Addr_Admin=10.1.8.11
|
||||
Rtr_Addr_Public=66.171.167.250
|
||||
Rrt_Port=13233
|
||||
Rtr_Addr_Private=10.1.40.254
|
||||
Rtr_CIDR_Mask=24
|
||||
Rtr_PUB_KEY=EsxauwYNBotyfDJzy9yCUXDci2gHbtZLhUWnMgMP0AY=
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
[Interface]
|
||||
PrivateKey = 6JSOiUqqTtgU0dH7/4dKKHNXcRfEHk5G+ZC16fc8RmI=
|
||||
Address = 10.1.40.2/32
|
||||
DNS = 10.1.3.40,10.1.3.41
|
||||
|
||||
[Peer]
|
||||
PublicKey = EsxauwYNBotyfDJzy9yCUXDci2gHbtZLhUWnMgMP0AY=
|
||||
PresharedKey = x1gubMKEhdOXaqMC82KJxy++d8iuKkbodG4UkCeg0Rc=
|
||||
Endpoint = 66.171.167.250:13233
|
||||
AllowedIPs = 10.0.0.0/8,192.168.0.0/24
|
||||
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
CCR:
|
||||
---------------------------------------------------------
|
||||
/interface wireguard peers add allowed-address=10.1.33.2/32 client-keepalive=10 disabled=no comment="User DaveOuellette" interface=WG-Users preshared-key="x1gubMKEhdOXaqMC82KJxy++d8iuKkbodG4UkCeg0Rc=" public-key="llensH2ENL4I7fSlo/iOZxP/e1SVf5ODSNvDjjLZ5CQ="
|
||||
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
[Interface]
|
||||
PrivateKey = 2JJoQbCWzka6elz1nCPsfbW9iIo8FM5QPoZO5d3weVY=
|
||||
ListenPort = 51821
|
||||
Address = 10.1.40.250/32
|
||||
DNS = 1.1.1.1,8.8.8.8
|
||||
|
||||
[Peer]
|
||||
PublicKey = EsxauwYNBotyfDJzy9yCUXDci2gHbtZLhUWnMgMP0AY=
|
||||
PresharedKey = sp9C00rnlbjza6Ny6Lcw2b5fBkDULYd1LoLuoRzmFjk=
|
||||
AllowedIPs = 10.0.0.0/8
|
||||
Endpoint = 66.171.167.250:13233
|
||||
PersistentKeepalive = 25
|
||||
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
[Interface]
|
||||
PrivateKey = kC7DaHcEfQ7KsJVBaWjG8XE/UL60GNjRsHOC/baNBGU=
|
||||
Address = 10.1.40.4/32
|
||||
DNS = 10.1.3.40,10.1.3.41
|
||||
|
||||
[Peer]
|
||||
PublicKey = DrI1g15KlMdLaqNn+PlVbl1kZo6jV9QDlJ1M8gy/m0g=
|
||||
PresharedKey = owl5S2bH9zeL0J0xjNgZ1Y0mb8lPFEjldwTTkNo0CrY=
|
||||
Endpoint = 66.171.167.250:13233
|
||||
AllowedIPs = 10.0.0.0/8,192.168.0.0/24
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
/interface wireguard peers add allowed-address=10.1.40.4/32 client-keepalive=10 disabled=no comment="User EricStein" interface=WG-Users \
|
||||
preshared-key="owl5S2bH9zeL0J0xjNgZ1Y0mb8lPFEjldwTTkNo0CrY=" public-key="DrI1g15KlMdLaqNn+PlVbl1kZo6jV9QDlJ1M8gy/m0g="
|
||||
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
[Interface]
|
||||
ListenPort = 51821
|
||||
PrivateKey = IM73gYzzN3riY1KaqBAGoIyldE7a7KS6QLoaDKd/G3E=
|
||||
Address = 10.1.40.3/32
|
||||
DNS = 10.1.3.40,10.1.3.41
|
||||
|
||||
[Peer]
|
||||
PublicKey = EsxauwYNBotyfDJzy9yCUXDci2gHbtZLhUWnMgMP0AY=
|
||||
PresharedKey = em/aPlSnK78xQMABuaz7GEQ1+7FXFXE+lIoYGbZ9tRs=
|
||||
Endpoint = 66.171.167.250:13233
|
||||
AllowedIPs = 10.0.0.0/8,192.168.0.0/24
|
||||
PersistentKeepalive = 25
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
CCR:
|
||||
---------------------------------------------------------
|
||||
/interface wireguard peers add allowed-address=10.1.33.3/32 client-keepalive=10 disabled=no comment="User GuyBoisvert" interface=WG-Users preshared-key="em/aPlSnK78xQMABuaz7GEQ1+7FXFXE+lIoYGbZ9tRs=" public-key="8m7W2+rhGtVKI603JoN7fKvP2Pr5FlvtxYOgVk8AFRg="
|
||||
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
Client:
|
||||
---------------------------------------------------------
|
||||
[Interface]
|
||||
PrivateKey = OKQeBlkw7aoxtGfTlxVJpbRJqXwEzz38dk2gFShMHmI=
|
||||
Address = 10.1.40.1/32
|
||||
DNS = 10.1.3.40,10.1.3.41
|
||||
|
||||
[Peer]
|
||||
PublicKey = EsxauwYNBotyfDJzy9yCUXDci2gHbtZLhUWnMgMP0AY=
|
||||
PresharedKey = Va8qOJXqvb8GaNCLUf3yzoGYX2+wZZkKHe/d4i+/Rhs=
|
||||
Endpoint = 66.171.167.250:13233
|
||||
AllowedIPs = 10.0.0.0/8,192.168.0.0/24
|
||||
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
CCR:
|
||||
---------------------------------------------------------
|
||||
/interface wireguard peers add allowed-address=10.1.33.1/32 client-keepalive=10 disabled=no comment="User SteveQuirion" interface=WG-Users preshared-key="Va8qOJXqvb8GaNCLUf3yzoGYX2+wZZkKHe/d4i+/Rhs=" public-key="PK9tjXmc7L9GrjHYZNp/ED+HFZdzfHNe+L7ZRfrBQUw="
|
||||
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
/interface wireguard peers
|
||||
add allowed-address=10.1.40.250/32 disabled=no name="guy" interface=WG-Users \
|
||||
preshared-key="sp9C00rnlbjza6Ny6Lcw2b5fBkDULYd1LoLuoRzmFjk=" public-key="KxI3ddeMCT8F9LSq0r49e5xnylMbc4ofKZPaz2foOT0="
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
[Interface]
|
||||
PrivateKey = 2JJoQbCWzka6elz1nCPsfbW9iIo8FM5QPoZO5d3weVY=
|
||||
ListenPort = 51821
|
||||
Address = 10.1.40.250/32
|
||||
DNS = 1.1.1.1,8.8.8.8
|
||||
|
||||
[Peer]
|
||||
PublicKey = EsxauwYNBotyfDJzy9yCUXDci2gHbtZLhUWnMgMP0AY=
|
||||
PresharedKey = sp9C00rnlbjza6Ny6Lcw2b5fBkDULYd1LoLuoRzmFjk=
|
||||
AllowedIPs = 10.0.0.0/8
|
||||
Endpoint = 66.171.167.250:13233
|
||||
PersistentKeepalive = 25
|
||||
|
||||
|
Before Width: | Height: | Size: 1.4 KiB |
|
|
@ -1,3 +0,0 @@
|
|||
/interface wireguard peers
|
||||
add allowed-address=10.1.40.251/32 disabled=no name="boum01" interface=WG-Users \
|
||||
preshared-key="42dSePvur9+8yZzgtmm5ZqhbqPDs6HTbNO/6hoZCnSY=" public-key="vN4dr8B8jBXD5s+YunG5OGXEim2MRqEN9b/lDmpMsR0="
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
[Interface]
|
||||
PrivateKey = sP6aXDHfNKnVZiB4KggyQo0/GQkWY4kiDVbUiG4V2VA=
|
||||
ListenPort = 51821
|
||||
Address = 10.1.40.251/32
|
||||
DNS = 10.1.3.40,10.1.3.41
|
||||
|
||||
[Peer]
|
||||
PublicKey = EsxauwYNBotyfDJzy9yCUXDci2gHbtZLhUWnMgMP0AY=
|
||||
PresharedKey = 42dSePvur9+8yZzgtmm5ZqhbqPDs6HTbNO/6hoZCnSY=
|
||||
AllowedIPs = 10.0.0.0/8
|
||||
Endpoint = 66.171.167.250:13233
|
||||
PersistentKeepalive = 25
|
||||
|
||||
|
Before Width: | Height: | Size: 1.5 KiB |
|
|
@ -1,3 +0,0 @@
|
|||
/interface wireguard peers
|
||||
add allowed-address=172.16.200.2/32 disabled=no name="pascal" interface=wg1 \
|
||||
preshared-key="RdbI9KNBQBNBVRyKNnhe7Ujw0A0nKOThDJJOJ7Lgp2Y=" public-key="E0R0TnS3WsDj2CTHa5YtFd3+zGFVZCYYfJzKbTWwqUw="
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
[Interface]
|
||||
PrivateKey = GJTT/i6ww5SSozn9ibs+vmQcWVJeQpiOyWDAobLjkXA=
|
||||
ListenPort = 51821
|
||||
Address = 172.16.200.2/32
|
||||
DNS = 1.1.1.1,8.8.8.8
|
||||
|
||||
[Peer]
|
||||
PublicKey = njwJywr8UndTeemZnxKT62aKxw0JGXggmSqNEHAulUE=
|
||||
PresharedKey = RdbI9KNBQBNBVRyKNnhe7Ujw0A0nKOThDJJOJ7Lgp2Y=
|
||||
AllowedIPs = 0.0.0.0/0
|
||||
Endpoint = d4450da4dffc.sn.mynetname.net:13235
|
||||
PersistentKeepalive = 25
|
||||
|
||||
|
Before Width: | Height: | Size: 1.4 KiB |
|
|
@ -1,3 +0,0 @@
|
|||
/interface wireguard peers
|
||||
add allowed-address=172.16.200.3/32 disabled=no name=" boig01" interface=wg1 \
|
||||
preshared-key="SAsf/9Lgw/3g0DXxbJYLnIff9Hb1irm8cRXsrAuCLOc=" public-key="8p3hP25gL2ALfRGStXs0fbk68em/aWobuMYS7w6GPzQ="
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
[Interface]
|
||||
PrivateKey = GHvOQbVIPOw3NIqGS2+FlyMcCKIbVvQRbBTtj0rkqVc=
|
||||
ListenPort = 51821
|
||||
Address = 172.16.200.3/32
|
||||
DNS = 1.1.1.1,8.8.8.8
|
||||
|
||||
[Peer]
|
||||
PublicKey = njwJywr8UndTeemZnxKT62aKxw0JGXggmSqNEHAulUE=
|
||||
PresharedKey = SAsf/9Lgw/3g0DXxbJYLnIff9Hb1irm8cRXsrAuCLOc=
|
||||
AllowedIPs = 10.1.0.0/24,10.50.0.0/24,172.16.28.0/24,172.16.29/24,10.96.0.0/12
|
||||
Endpoint = d4450da4dffc.sn.mynetname.net:13235
|
||||
PersistentKeepalive = 25
|
||||
|
||||
|
Before Width: | Height: | Size: 1.4 KiB |
|
|
@ -1,13 +0,0 @@
|
|||
[Interface]
|
||||
PrivateKey = UEX8Fq51QVG6oIPdCy8eWfrJcONrArRqyieK1faBzkE=
|
||||
ListenPort = 51821
|
||||
Address = 172.16.28.1/32
|
||||
DNS = 1.1.1.1,8.8.8.8
|
||||
|
||||
[Peer]
|
||||
PublicKey = 3ZnjnM9d/TL2MoNnEgNRlDztYEhHLNjb8EXai9utzCk=
|
||||
PresharedKey = azOSAxvB4FqFR0XYvXiVZL3XZn1QD5S1ttQSSc/MiTk=
|
||||
AllowedIPs = 172.16.24.0/24,172.16.44.0/24
|
||||
Endpoint = 45.61.15.102:13239
|
||||
PersistentKeepalive = 25
|
||||
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
[RB5009]
|
||||
Rtr_Addr_Public=heh08h84mnt.sn.mynetname.net
|
||||
Rrt_Port=14321
|
||||
Rtr_Interface=WG-Devices
|
||||
Rtr_Addr_Private=172.16.254.2
|
||||
Rtr_CIDR_Mask=24
|
||||
Rtr_PUB_KEY=MmTMFo+Fs3N9jrcVeGKkmMi2NoZctvSB7813LCN12nY=
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
|
||||
[WG01]
|
||||
Rtr_Addr_Public=heh08h84mnt.sn.mynetname.net
|
||||
Rrt_Port=14322
|
||||
Rtr_Addr_Private=172.16.40.254
|
||||
Rtr_CIDR_Mask=24
|
||||
Rtr_PUB_KEY=iPArVoKAjEYTsvSb2NdQRDIUxHPHBgGTHAK3uAKKvkw=
|
||||
|
||||
[WG02]
|
||||
Rtr_Addr_Public=heh08h84mnt.sn.mynetname.net
|
||||
Rrt_Port=14322
|
||||
Rtr_Addr_Private=172.16.40.254
|
||||
Rtr_CIDR_Mask=24
|
||||
Rtr_PUB_KEY=iPArVoKAjEYTsvSb2NdQRDIUxHPHBgGTHAK3uAKKvkw=
|
||||
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
/interface wireguard peers
|
||||
add allowed-address=172.16.40.2/32 disabled=no name="guy" interface=WG01 \
|
||||
preshared-key="Ib7k3/rWONN4Ga4oA5EfweGiMk8+BvS59HYmpSkSzCA=" public-key="ziekWouNBWmOUIlCx9uO6U4FOoBQbagLqOwnKKEsvn4="
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
[Interface]
|
||||
PrivateKey = eOmsbsjFnFi9AtWjJyQmPmWUSdq0gg2P35ysdxOJyVE=
|
||||
ListenPort = 51821
|
||||
Address = 172.16.40.2/32
|
||||
DNS = 1.1.1.1,8.8.8.8
|
||||
|
||||
[Peer]
|
||||
PublicKey = iPArVoKAjEYTsvSb2NdQRDIUxHPHBgGTHAK3uAKKvkw=
|
||||
PresharedKey = Ib7k3/rWONN4Ga4oA5EfweGiMk8+BvS59HYmpSkSzCA=
|
||||
AllowedIPs = 0.0.0.0/0
|
||||
Endpoint = heh08h84mnt.sn.mynetname.net:14322
|
||||
PersistentKeepalive = 25
|
||||
|
||||
|
Before Width: | Height: | Size: 1.4 KiB |
|
|
@ -1,34 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
|
||||
INI_FILE="$1"
|
||||
SECTIONS_NUM=0
|
||||
unset ${INI_ALL_SECTION}
|
||||
|
||||
|
||||
|
||||
while read -r line || [ -n "$line" ]
|
||||
do
|
||||
echo -e "\nLine = $line"
|
||||
# Skip blank lines and comments
|
||||
if [ -z "$line" -o "${line:0:1}" = ";" -o "${line:0:1}" = "#" ]
|
||||
then
|
||||
continue
|
||||
fi
|
||||
|
||||
# Section marker?
|
||||
if [[ "${line}" =~ ^\[[a-zA-Z0-9_]{1,}\]$ ]]
|
||||
then
|
||||
# Set SECTION var to name of section (strip [ and ] from section marker)
|
||||
SECTION="${line#[}"
|
||||
SECTION="${SECTION%]}"
|
||||
echo -e "SECTION = ${SECTION}"
|
||||
#eval "${INI_ALL_SECTION}=\"\${${INI_ALL_SECTION}# } $SECTION\""
|
||||
((SECTIONS_NUM++))
|
||||
continue
|
||||
fi
|
||||
done <"${INI_FILE}"
|
||||
|
||||
echo -e "SECTIONS_NUM = $SECTIONS_NUM"
|
||||
|
||||
echo "INI_ALL_SECTION = $INI_ALL_SECTION"
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
[RB5009]
|
||||
Rtr_Addr_Public=heh08h84mnt.sn.mynetname.net
|
||||
Rrt_Port=14322
|
||||
Rtr_Interface=WG-Users
|
||||
Rtr_Addr_Private=172.16.40.254
|
||||
Rtr_CIDR_Mask=24
|
||||
Rtr_PUB_KEY=iPArVoKAjEYTsvSb2NdQRDIUxHPHBgGTHAK3uAKKvkw=
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
/interface wireguard peers
|
||||
add allowed-address=172.16.40.3/32 disabled=no name="pcguy" interface=WG-Users \
|
||||
preshared-key="nlvAgKyqzNZon2vv8mGBUoFIyGZ5XWmNLLEN+ULI8OU=" public-key="UYXWTpjsuLD8oBIbmG+/E4ayJ7/HvEs5RotwqlW2938="
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
[Interface]
|
||||
PrivateKey = sIwBWQDsBHyXh50pjFEF04NtK5H2zan9eyo1G189VXo=
|
||||
ListenPort = 51821
|
||||
Address = 172.16.40.3/32
|
||||
DNS = 1.1.1.1,8.8.8.8
|
||||
|
||||
[Peer]
|
||||
PublicKey = iPArVoKAjEYTsvSb2NdQRDIUxHPHBgGTHAK3uAKKvkw=
|
||||
PresharedKey = nlvAgKyqzNZon2vv8mGBUoFIyGZ5XWmNLLEN+ULI8OU=
|
||||
AllowedIPs = 0.0.0.0/0
|
||||
Endpoint = heh08h84mnt.sn.mynetname.net:14322
|
||||
PersistentKeepalive = 25
|
||||
|
||||
|
Before Width: | Height: | Size: 1.4 KiB |
|
|
@ -1,3 +0,0 @@
|
|||
/interface wireguard peers
|
||||
add allowed-address=10.8.38.4/32 disabled=no comment="User Guy" interface=wg1 \
|
||||
preshared-key="azOSAxvB4FqFR0XYvXiVZL3XZn1QD5S1ttQSSc/MiTk=" public-key="xXg+ZoZcv36AuzmfzpBAqGDmgIhEwkucFw5bm/kgCTM="
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
[Interface]
|
||||
PrivateKey = UEX8Fq51QVG6oIPdCy8eWfrJcONrArRqyieK1faBzkE=
|
||||
ListenPort = 51821
|
||||
Address = 10.8.38.4/32
|
||||
DNS = 1.1.1.1,8.8.8.8
|
||||
|
||||
[Peer]
|
||||
PublicKey = iPArVoKAjEYTsvSb2NdQRDIUxHPHBgGTHAK3uAKKvkw=
|
||||
PresharedKey = azOSAxvB4FqFR0XYvXiVZL3XZn1QD5S1ttQSSc/MiTk=
|
||||
AllowedIPs = 10.8.0.0/16
|
||||
Endpoint = seve.ingtegration.com:14322
|
||||
PersistentKeepalive = 25
|
||||
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
/interface wireguard peers
|
||||
add allowed-address=172.16.15.1/32 disabled=no comment="User Samantha" interface=WG-Users \
|
||||
preshared-key="PVmxXI1HtsrmM/pmmOfPJRLj9ITG6LXDEGN9NyT/wzY=" public-key="+MNTBsVZUQZ+tjFz9mD1uLH8CEAifSM9O0xqlm+XfCM="
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
[Interface]
|
||||
PrivateKey = UA2nrQP2taQy1aYWtwxPPD2/qbQwiWckWSS2ucp5lnE=
|
||||
ListenPort = 51821
|
||||
Address = 172.16.15.1/32
|
||||
DNS = 1.1.1.1,8.8.8.8
|
||||
|
||||
[Peer]
|
||||
PublicKey = lCzZXZYTwnDGVbAtEE/vEH0TtpVqy7fBcZMBXiBBA1s=
|
||||
PresharedKey = PVmxXI1HtsrmM/pmmOfPJRLj9ITG6LXDEGN9NyT/wzY=
|
||||
AllowedIPs = 172.16.0.0/16
|
||||
Endpoint = b4a30b139a75.sn.mynetname.net:14233
|
||||
PersistentKeepalive = 25
|
||||
|
||||
|
Before Width: | Height: | Size: 1.4 KiB |
|
|
@ -1,288 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
Version=240226-1434
|
||||
debug=0
|
||||
CORP=EVOQ
|
||||
Rtr_CCR1_Addr="d90d0d815e13.sn.mynetname.net"
|
||||
Rtr_CCR1_Port="13232"
|
||||
Usr_CCR1_Addr="d90d0d815e13.sn.mynetname.net"
|
||||
Usr_CCR1_Port="13233"
|
||||
|
||||
|
||||
ScriptName=$(basename "$0")
|
||||
BaseDir="/home/boig01/temp/wireguard/real"
|
||||
WgRtrDir="${BaseDir}/routers"
|
||||
WgUsrDir="${BaseDir}/users"
|
||||
|
||||
RTR_CCR1_PUB_KEY="9au45IDNJhHDNtN+LIpJDyMFTEYdN9WOSSHEJS8WRmw="
|
||||
USR_CCR1_PUB_KEY="vaH/ozwjGfhC1ODOJZ6PExwDNTRlms2kU43xmGi67yg="
|
||||
|
||||
NumUser=0
|
||||
NumRouter=0
|
||||
NameUser=0
|
||||
Mode=0
|
||||
|
||||
YELLOW='\033[0;33«m'
|
||||
GREEN='\033[0;32m'
|
||||
RED='\033[0;31m'
|
||||
BLUE='\033[0;34m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
# Create paths if not there
|
||||
[ ! -d "$WgRtrDir" ] && mkdir -p "${WgRtrDir}"
|
||||
[ ! -d "$WgUsrDir" ] && mkdir -p "${WgUsrDir}"
|
||||
|
||||
|
||||
Start_Subnet=10.1.32.0
|
||||
Bits_Subnet=3
|
||||
Subnet_Bits=$((32-Bits_Subnet)) # Router address subnet bits
|
||||
NAPS=$((2**Bits_Subnet)) # Nombre d'Adresses Par Subnet
|
||||
|
||||
|
||||
|
||||
#=================== function Help ============================================
|
||||
#
|
||||
function Help()
|
||||
{
|
||||
echo -e "
|
||||
WireGuard-MikroTik ${BLUE}${CORP}${NC} configurator
|
||||
|
||||
usage:
|
||||
${ScriptName} [Options]
|
||||
|
||||
-n User # (Unique user number between 1 and 253)
|
||||
-u User name (AdrianSmith)
|
||||
-r Router # (EVOQ router #, like 1 or 11)
|
||||
|
||||
When in user mode, you must provide name & unique user number between 2 and 253.
|
||||
This user number will be assigned an ip address 10.1.40.[user #].
|
||||
|
||||
" && exit
|
||||
}
|
||||
|
||||
|
||||
|
||||
#=================== function Info =============================================
|
||||
#
|
||||
# Avec date / time prefix
|
||||
#
|
||||
Info() { printf "${GREEN}%s ${NC} %s\n" "$( date +%F_%T )" "$*" >&2; } # send to stderr
|
||||
|
||||
#=================== function Message ==========================================
|
||||
#
|
||||
#
|
||||
Message() { printf "\n${GREEN}%s${NC}\n" "$*"; } # send to stdout
|
||||
|
||||
|
||||
|
||||
|
||||
#=================== function ip2int ===========================================
|
||||
#
|
||||
ip2int()
|
||||
{
|
||||
local a b c d
|
||||
{ IFS=. read a b c d; } <<< $1
|
||||
echo $(((((((a << 8) | b) << 8) | c) << 8) | d))
|
||||
}
|
||||
|
||||
|
||||
#=================== function int2ip ===========================================
|
||||
#
|
||||
int2ip()
|
||||
{
|
||||
local ui32=$1; shift
|
||||
local ip n
|
||||
for n in 1 2 3 4; do
|
||||
ip=$((ui32 & 0xff))${ip:+.}$ip
|
||||
ui32=$((ui32 >> 8))
|
||||
done
|
||||
echo $ip
|
||||
}
|
||||
|
||||
|
||||
|
||||
#======================== CreateUser ==========================================
|
||||
#
|
||||
function CreateUser()
|
||||
{
|
||||
ClientName=$1
|
||||
ClientNum=$2
|
||||
|
||||
CLIENT_PRIV_KEY=$(wg genkey)
|
||||
CLIENT_PUB_KEY=$(echo "${CLIENT_PRIV_KEY}" | wg pubkey)
|
||||
CLIENT_PRE_SHARED_KEY=$(wg genpsk)
|
||||
CLIENT_NUM=$(printf "%03d" $2)
|
||||
CLIENT_FILE_PREFIX="${CLIENT_NUM}-${ClientName}"
|
||||
CLIENT_FILE_WIN="${WgUsrDir}/${CLIENT_FILE_PREFIX}.conf"
|
||||
CLIENT_FILE_RTR="${WgUsrDir}/${CLIENT_FILE_PREFIX}.CCR1.rsc"
|
||||
|
||||
((debug)) && echo -e "
|
||||
ClientName = $1
|
||||
CLIENT_NUM = $CLIENT_NUM
|
||||
CLIENT_FILE_WIN = $CLIENT_FILE_WIN
|
||||
CLIENT_FILE_RTR = $CLIENT_FILE_RTR
|
||||
" && exit
|
||||
|
||||
|
||||
echo -e "Client:
|
||||
${GREEN}---------------------------------------------------------${NC}"
|
||||
echo -e "[Interface]
|
||||
PrivateKey = ${CLIENT_PRIV_KEY}
|
||||
ListenPort = 51821
|
||||
Address = 192.168.10.${ClientNum}/32
|
||||
DNS = 192.168.10.1,1.1.1.1
|
||||
|
||||
[Peer]
|
||||
PublicKey = ${USR_CCR1_PUB_KEY}
|
||||
PresharedKey = ${CLIENT_PRE_SHARED_KEY}
|
||||
AllowedIPs = 192.168.0.0/16
|
||||
Endpoint = ${Usr_CCR1_Addr}:${Usr_CCR1_Port}
|
||||
" | tee "${CLIENT_FILE_WIN}"
|
||||
|
||||
|
||||
echo -e "\nCCR:
|
||||
---------------------------------------------------------"
|
||||
echo -e "/interface wireguard peers add
|
||||
allowed-address=192.168.10.${ClientNum}/32 client-keepalive=10 disabled=no comment=\"User ${ClientName}\" interface=wg1 \\
|
||||
preshared-key=\"${CLIENT_PRE_SHARED_KEY}\" public-key=\"${CLIENT_PUB_KEY}\""| tee "${CLIENT_FILE_RTR}"
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#======================== CreateRouter ========================================
|
||||
#
|
||||
function CreateRouter()
|
||||
{
|
||||
RouterNum="$1"
|
||||
RouterSubnet="$2"
|
||||
|
||||
RTR_PRIV_KEY=$(wg genkey)
|
||||
RTR_PUB_KEY=$(echo "${RTR_PRIV_KEY}" | wg pubkey)
|
||||
RTR_PRE_SHARED_KEY=$(wg genpsk)
|
||||
RTR_NUM=$(printf "%03d" $1)
|
||||
RTR_FILE_PREFIX="${RTR_NUM}-Router"
|
||||
RTR_FILE_RTR="${WgRtrDir}/${RTR_FILE_PREFIX}.rsc"
|
||||
RTR_FILE_RTR_CCR1="${WgRtrDir}/${RTR_FILE_PREFIX}.CCR1.rsc"
|
||||
|
||||
|
||||
((debug)) && echo -e "
|
||||
ClientName = $1
|
||||
CLIENT_NUM = $RTR_NUM
|
||||
CLIENT_FILE_RTR = $RTR_FILE_RTR
|
||||
" && exit
|
||||
|
||||
|
||||
Message "** Generated output files:"
|
||||
echo -e "${GREEN}---------------------------------------------------------${NC}
|
||||
${RTR_FILE_RTR}
|
||||
${RTR_FILE_RTR_CCR1}
|
||||
"
|
||||
Message "** Router Client Config:"
|
||||
echo -e "${GREEN}---------------------------------------------------------${NC}"
|
||||
echo -e "/interface wireguard
|
||||
add listen-port=13239 mtu=1420 name=wg01 private-key=\"${RTR_PRIV_KEY}\"
|
||||
|
||||
/ip address add address=10.1.41.${RouterNum}/32 comment=wg-wg01 interface=wg01
|
||||
/ip route add dst-address=10.0.0.0/8 gateway=wg01
|
||||
/ip route add dst-address=192.168.0.0/16 gateway=wg01
|
||||
|
||||
/interface wireguard peers add allowed-address=10.0.0.0/8,192.168.0.0/16 client-keepalive=10 disabled=no comment=\"CCR1 Montreal\" interface=wg01 \\
|
||||
endpoint-address=${Rtr_CCR1_Addr} endpoint-port=${Rtr_CCR1_Port} preshared-key=\"${RTR_PRE_SHARED_KEY}\" public-key=\"${RTR_CCR1_PUB_KEY}\"
|
||||
|
||||
/system script add dont-require-permissions=no name=ping-CCR1 owner=admin policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source=\\
|
||||
\"/ping interval=10 10.1.8.11 count=61\"
|
||||
|
||||
/system/scheduler add interval=10m name=Ping-CCR1 on-event=\"/system/script/run ping-CCR1\" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=apr/02/2022 start-time=12:00:00 " \
|
||||
| tee "${RTR_FILE_RTR}"
|
||||
|
||||
|
||||
#echo -e "\n"
|
||||
Message "** CCR1 Config:"
|
||||
echo -e "${GREEN}---------------------------------------------------------${NC}"
|
||||
echo -e "/interface wireguard peers add allowed-address=10.1.41.${RouterNum}/32,${RouterSubnet} disabled=no comment=\"Router ${RouterNum}\" \\
|
||||
interface=WG-Routers preshared-key=\"${RTR_PRE_SHARED_KEY}\" public-key=\"${RTR_PUB_KEY}\"
|
||||
|
||||
/ip route add dst-address=${RouterSubnet} gateway=10.1.41.${RouterNum}" \
|
||||
| tee "${RTR_FILE_RTR_CCR1}"
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#=================== function RrtSubnet ========================================
|
||||
#
|
||||
RtrSubnet()
|
||||
{
|
||||
local RtrNum=$1
|
||||
|
||||
BaseNum=$(ip2int $Start_Subnet) # Subnet de depart en format integer
|
||||
Nth=$((RtrNum-1)) # Le router #1 est "0" dans la séquence de subnet, #2 est 1, etc
|
||||
Nth=$((Nth*NAPS)) # Decimal a aditionner en fonction pour le Nth router
|
||||
Subnet=$((BaseNum+Nth)) # Nth subnet calculé
|
||||
# Subnet="${Subnet}/$(Bits_Subnet=3})"
|
||||
|
||||
echo -e "$(int2ip $Subnet)/${Subnet_Bits}"
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#================ MAIN ========================================================
|
||||
#
|
||||
|
||||
((!$#)) && Help && exit # If no command parameters passed, help and bail out
|
||||
echo -e "\nWireGuard-MikroTik ${BLUE}${CORP}${NC} configurator version $Version\n"
|
||||
|
||||
while getopts dhn:r:u: option
|
||||
do
|
||||
case "${option}" in
|
||||
d) debug=1
|
||||
;;
|
||||
h) Help
|
||||
exit ;;
|
||||
n) NumUser=${OPTARG}
|
||||
Mode="User"
|
||||
;;
|
||||
r) NumRouter=${OPTARG}
|
||||
Mode="Router"
|
||||
;;
|
||||
u) NameUser=${OPTARG}
|
||||
;;
|
||||
*) echo -e "Usage (bad argument: $OPTARG) \n"
|
||||
exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
((debug)) && echo -e "
|
||||
NumRouter = ${NumRouter}
|
||||
NumUser = ${NumUser}
|
||||
RtrSubnet = $(RtrSubnet ${NumRouter})
|
||||
" && exit
|
||||
|
||||
|
||||
|
||||
|
||||
if [[ "${NumRouter}" -ne "0" && "${NumUser}" -ne "0" ]]
|
||||
then
|
||||
echo "** Error, can't use user and router # simulteaneously"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
case "$Mode" in
|
||||
User) CreateUser $NameUser $NumUser
|
||||
exit
|
||||
;;
|
||||
Router) CreateRouter $NumRouter $(RtrSubnet ${NumRouter})
|
||||
exit
|
||||
;;
|
||||
*) echo -e "\n** ERROR : User # was not provided"
|
||||
Help
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
/interface wireguard peers add
|
||||
allowed-address=10.1.40.1/32 client-keepalive=10 disabled=no comment="User Real" interface=wg1 \
|
||||
preshared-key="EGEruoS+9iFaDV7MOydXdkE8eQGpDhil446OzImIfOY=" public-key="J4nC/m8G2wMNDYeywORCYIo9eZq6v6fMgZVOFpRv3m0="
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
[Interface]
|
||||
ListenPort = 51821
|
||||
PrivateKey = QHjXJWfo+G2BoJTKaLEviueDyK90nW/14ibUD3X31HI=
|
||||
Address = 192.168.10.1/32
|
||||
DNS = 192.168.10.254,1.1.1.1
|
||||
|
||||
[Peer]
|
||||
PublicKey = vaH/ozwjGfhC1ODOJZ6PExwDNTRlms2kU43xmGi67yg=
|
||||
PresharedKey = EGEruoS+9iFaDV7MOydXdkE8eQGpDhil446OzImIfOY=
|
||||
Endpoint = d90d0d815e13.sn.mynetname.net:13233
|
||||
AllowedIPs = 192.168.0.0/16
|
||||
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
/interface wireguard peers add
|
||||
allowed-address=192.168.10.2/32 client-keepalive=10 disabled=no comment="User Guy" interface=wg1 \
|
||||
preshared-key="0FaSQ2/iTj2Eu7ttME16pIet6nJnh0gtfEACK9aCCBI=" public-key="tQk6OTijE3YawHAQk6jfcVmgMzvH3zUyNqrhl3zRmHQ="
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
[Interface]
|
||||
ListenPort = 51821
|
||||
PrivateKey = wDaoTqcCfIar7dukhYQYu8M5LDN+3BZc8Zcn/UetjWQ=
|
||||
Address = 192.168.10.2/32
|
||||
DNS = 1.1.1.1
|
||||
|
||||
[Peer]
|
||||
PublicKey = vaH/ozwjGfhC1ODOJZ6PExwDNTRlms2kU43xmGi67yg=
|
||||
PresharedKey = 0FaSQ2/iTj2Eu7ttME16pIet6nJnh0gtfEACK9aCCBI=
|
||||
Endpoint = d90d0d815e13.sn.mynetname.net:13233
|
||||
AllowedIPs = 192.168.2.0/24
|
||||
|
||||
|
|
@ -1 +0,0 @@
|
|||
/home/boig01/Nextcloud2/guydev/network/wireguard/real/users/002-Guy.conf
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
[RB5009-Users]
|
||||
RtrInterface=WG-Users
|
||||
Rtr_Addr_Admin=10.1.99.254
|
||||
Rtr_Addr_Public=142.217.209.155
|
||||
Rrt_Port=13235
|
||||
Rtr_Addr_Private=10.1.15.254
|
||||
Rtr_CIDR_Mask=24
|
||||
Rtr_PUB_KEY=zHEBUKg9qNtC9+RaQeHiDoTmlsPc+9NBN+H+W/ZDPF4=
|
||||
Rtr_DNS=10.1.15.254
|
||||
Rtr_Route_Subnet=10.1.0.0/16
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
/interface wireguard peers
|
||||
add allowed-address=10.1.15.1/32 disabled=no name="boig01" interface=WG-Users \
|
||||
preshared-key="tqtgjTsZUxkdFM1IQNfRdNuYf2MgH/2kHOOO1+ilMCQ=" public-key="r11A7Z+IBeLFL6G+a+M0jgr1tTd9jTl/b+RROj/6whk="
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
[Interface]
|
||||
PrivateKey = UKNcUZwVMzU4icXo2M7WsLm2OVvUiPTBndLn3xBiB2Y=
|
||||
ListenPort = 51821
|
||||
Address = 10.1.15.1/32
|
||||
DNS = 10.1.15.254
|
||||
|
||||
[Peer]
|
||||
PublicKey = zHEBUKg9qNtC9+RaQeHiDoTmlsPc+9NBN+H+W/ZDPF4=
|
||||
PresharedKey = tqtgjTsZUxkdFM1IQNfRdNuYf2MgH/2kHOOO1+ilMCQ=
|
||||
AllowedIPs = 10.1.0.0/16
|
||||
Endpoint = 142.217.209.155:13235
|
||||
PersistentKeepalive = 25
|
||||
|
||||
|
Before Width: | Height: | Size: 1.4 KiB |
|
|
@ -1,3 +0,0 @@
|
|||
/interface wireguard peers
|
||||
add allowed-address=10.1.15.2/32 client-keepalive=20s disabled=no name="boucm01" interface=WG-Users \
|
||||
preshared-key="6VOptNdny7TsKvQvcWFn0V+RtBMs+iin3elOxE9tXX8=" public-key="yxVvlFZnnZOePdCxLX27zsnLfApcGBhmlqR5772mN2c="
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
[Interface]
|
||||
PrivateKey = ACO/UBhvrQMLlrtEE7sU8qgDxYVmYLEn+j6hva8BBHM=
|
||||
ListenPort = 51821
|
||||
Address = 10.1.15.2/32
|
||||
DNS = 10.1.15.254
|
||||
|
||||
[Peer]
|
||||
PublicKey = zHEBUKg9qNtC9+RaQeHiDoTmlsPc+9NBN+H+W/ZDPF4=
|
||||
PresharedKey = 6VOptNdny7TsKvQvcWFn0V+RtBMs+iin3elOxE9tXX8=
|
||||
AllowedIPs = 10.1.0.0/16
|
||||
Endpoint = 142.217.209.155:13235
|
||||
PersistentKeepalive = 25
|
||||
|
||||
|
Before Width: | Height: | Size: 1.4 KiB |
|
|
@ -1,8 +0,0 @@
|
|||
[CCR1009]
|
||||
RtrInterface=WG-Users
|
||||
Rtr_Addr_Admin=10.3.8.1
|
||||
Rtr_Addr_Public=184.95.250.138
|
||||
Rrt_Port=13421
|
||||
Rtr_Addr_Private=10.3.13.254
|
||||
Rtr_CIDR_Mask=24
|
||||
Rtr_PUB_KEY=ZypJ/xU5ieCA3+iHR5AhoPP6XDsSTpMuzo5foi+bWWc=
|
||||
|
|
@ -1 +0,0 @@
|
|||
U-001-guy.conf
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
/interface wireguard peers
|
||||
add allowed-address=10.3.13.1/32 disabled=no name="guy" interface=WG-Users \
|
||||
preshared-key="ZhEZjV5AxymxSHWAXL0zyhpzdxSqRcl8RJi2/M1b+vw=" public-key="I0B0XvNOt0c781ir/WtUC2oc3dnmIoJPr9vLacJHdFY="
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
[Interface]
|
||||
PrivateKey = WDYlcHHQIz1pjqOLBRtNyLteSIbs7dKzJq60MJ8Pv0k=
|
||||
ListenPort = 51821
|
||||
Address = 10.3.13.1/32
|
||||
DNS = 10.3.6.15
|
||||
|
||||
[Peer]
|
||||
PublicKey = ZypJ/xU5ieCA3+iHR5AhoPP6XDsSTpMuzo5foi+bWWc=
|
||||
PresharedKey = ZhEZjV5AxymxSHWAXL0zyhpzdxSqRcl8RJi2/M1b+vw=
|
||||
AllowedIPs = 10.3.0.0/16
|
||||
Endpoint = 184.95.250.138:13421
|
||||
PersistentKeepalive = 25
|
||||
|
||||
|
Before Width: | Height: | Size: 1.4 KiB |
|
|
@ -1,3 +0,0 @@
|
|||
/interface wireguard peers
|
||||
add allowed-address=10.3.13.2/32 disabled=no name="marc" interface=WG-Users \
|
||||
preshared-key="adwActiBEETXk6wSx8V0w0GD7kFZ7j7CPlzuFRleG/s=" public-key="Hmz/JS3QYKNKuHFSs2fVyh3MxuEhLLRuUWXmAO4P1FY="
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
[Interface]
|
||||
PrivateKey = wGh9Fx2x4FDyv0cuQK1g8yFm+tqTRRamdoneccfaEEw=
|
||||
ListenPort = 51821
|
||||
Address = 10.3.13.2/32
|
||||
DNS = 10.3.6.15
|
||||
|
||||
[Peer]
|
||||
PublicKey = ZypJ/xU5ieCA3+iHR5AhoPP6XDsSTpMuzo5foi+bWWc=
|
||||
PresharedKey = adwActiBEETXk6wSx8V0w0GD7kFZ7j7CPlzuFRleG/s=
|
||||
AllowedIPs = 10.3.0.0/16
|
||||
Endpoint = 184.95.250.138:13421
|
||||
PersistentKeepalive = 25
|
||||
|
||||
|
Before Width: | Height: | Size: 1.4 KiB |
|
|
@ -1,3 +0,0 @@
|
|||
/interface wireguard peers
|
||||
add allowed-address=10.3.13.5/32 disabled=no name="exoc" interface=WG-Users \
|
||||
preshared-key="KGTzc6c4BSf/pFoT79CdeTtt2CT6eTQKaoMyL2jaCYg=" public-key="69ohh5vjeOFU6N7Q82GcRF7/Ss2tmNQ1MCQGMZC08xI="
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
[Interface]
|
||||
PrivateKey = cIPz2r+7Bu2jpI1ShXaaFrF6qbI1aYLrJR9FTiqQ53g=
|
||||
ListenPort = 51821
|
||||
Address = 10.3.13.5/32
|
||||
DNS = 1.1.1.1,8.8.8.8
|
||||
|
||||
[Peer]
|
||||
PublicKey = ZypJ/xU5ieCA3+iHR5AhoPP6XDsSTpMuzo5foi+bWWc=
|
||||
PresharedKey = KGTzc6c4BSf/pFoT79CdeTtt2CT6eTQKaoMyL2jaCYg=
|
||||
AllowedIPs = 10.3.0.0/16
|
||||
Endpoint = 184.95.250.138:13421
|
||||
PersistentKeepalive = 25
|
||||
|
||||
|
Before Width: | Height: | Size: 1.4 KiB |
|
|
@ -1,3 +0,0 @@
|
|||
/interface wireguard peers
|
||||
add allowed-address=10.3.13.6/32 disabled=no name="pascal" interface=WG-Users \
|
||||
preshared-key="V1oUlbYR+11SBr5W0hOtUuyRdwVioIfyKJDrHSrUToY=" public-key="jKNIbZkJf4zOGIYVhIawZzC4NXEsKBDTBmNjdEmR2GU="
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
[Interface]
|
||||
PrivateKey = aPBd3mVCh1Xvd6EoG4xzwHJ8cb1AuPK4NunE8sZf+30=
|
||||
ListenPort = 51821
|
||||
Address = 10.3.13.6/32
|
||||
DNS = 1.1.1.1,8.8.8.8
|
||||
|
||||
[Peer]
|
||||
PublicKey = ZypJ/xU5ieCA3+iHR5AhoPP6XDsSTpMuzo5foi+bWWc=
|
||||
PresharedKey = V1oUlbYR+11SBr5W0hOtUuyRdwVioIfyKJDrHSrUToY=
|
||||
AllowedIPs = 10.3.0.0/16
|
||||
Endpoint = 184.95.250.138:13421
|
||||
PersistentKeepalive = 25
|
||||
|
||||
|
Before Width: | Height: | Size: 1.4 KiB |
|
|
@ -1,2 +0,0 @@
|
|||
/interface wireguard peers
|
||||
add allowed-address=10.3.13.1/32 disabled=no name="guy" interface=WG-Users preshared-key="ZhEZjV5AxymxSHWAXL0zyhpzdxSqRcl8RJi2/M1b+vw=" public-key="I0B0XvNOt0c781ir/WtUC2oc3dnmIoJPr9vLacJHdFY="
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
# WireGuard client peer configure
|
||||
/interface wireguard peers
|
||||
add allowed-address=10.100.99.2/32 comment=\
|
||||
wg01-client-Router001 interface=wg01 \
|
||||
preshared-key="evIsO6Pl6d9uFSkM0RrAzkYyVqbhBiG3+1XKaXgD5Ws=" public-key=\
|
||||
"xDaZbGDa+Q66zdmnH5Ngjh0byL7bMKEdKdlQ+3wNG0U="
|
||||
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
[Interface]
|
||||
PrivateKey = yMtyTz/gLwMLzbkmGriTRQeQu3vuuyStGz7LPv1f3GI=
|
||||
Address = 10.100.99.2/32,fd42:64:63::2/128
|
||||
DNS = 1.1.1.1,8.8.8.8
|
||||
|
||||
[Peer]
|
||||
PublicKey = oIZef/qKVdZm6sWzX3SqRs8Yr1wdJQEynKMtZ6+v32A=
|
||||
PresharedKey = evIsO6Pl6d9uFSkM0RrAzkYyVqbhBiG3+1XKaXgD5Ws=
|
||||
Endpoint = 172.16.16.136:13231
|
||||
AllowedIPs = 0.0.0.0/0,::/0
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
|
|
@ -1,101 +0,0 @@
|
|||
# WireGuard interface configure
|
||||
/interface wireguard
|
||||
add listen-port=13231 mtu=1420 name=wg01 private-key="sLKaz0+jIgc3hkmob7tKXcRM1nAyKCzNn4IxhXOuv20="
|
||||
/ip address add address=10.100.99.1/24 comment=wg-wg01 interface=wg01
|
||||
|
||||
# WireGuard client peer configure
|
||||
/interface wireguard peers
|
||||
add allowed-address=10.100.99.2/32 comment=wg01-client-Router001 interface=wg01 \
|
||||
preshared-key="evIsO6Pl6d9uFSkM0RrAzkYyVqbhBiG3+1XKaXgD5Ws=" public-key=\
|
||||
"xDaZbGDa+Q66zdmnH5Ngjh0byL7bMKEdKdlQ+3wNG0U="
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
CLIENT_PRIV_KEY=$(wg genkey)
|
||||
CLIENT_PUB_KEY=$(echo "${CLIENT_PRIV_KEY}" | wg pubkey)
|
||||
|
||||
|
||||
|
||||
Users 10.1.40.0/24
|
||||
WG_Users Pub Key : EsxauwYNBotyfDJzy9yCUXDci2gHbtZLhUWnMgMP0AY=
|
||||
Usr_CCR1_Addr="66.171.167.250"
|
||||
Usr_CCR1_Port="13233"
|
||||
|
||||
Routers 10.1.41.0/24
|
||||
WG_Routers Pub Key : 9au45IDNJhHDNtN+LIpJDyMFTEYdN9WOSSHEJS8WRmw=
|
||||
Rtr_CCR1_Addr="66.171.167.250"
|
||||
Rtr_CCR1_Port="13232"
|
||||
|
||||
|
||||
|
||||
|
||||
Guy EVOQ Config:
|
||||
=================
|
||||
[Interface]
|
||||
ListenPort = 51821
|
||||
PrivateKey = IM73gYzzN3riY1KaqBAGoIyldE7a7KS6QLoaDKd/G3E=
|
||||
Address = 10.1.40.3/32
|
||||
DNS = 10.1.3.40,10.1.3.41
|
||||
|
||||
[Peer]
|
||||
PublicKey = EsxauwYNBotyfDJzy9yCUXDci2gHbtZLhUWnMgMP0AY=
|
||||
PresharedKey = em/aPlSnK78xQMABuaz7GEQ1+7FXFXE+lIoYGbZ9tRs=
|
||||
Endpoint = 66.171.167.250:13233
|
||||
AllowedIPs = 10.0.0.0/8,192.168.0.0/24
|
||||
PersistentKeepalive = 25
|
||||
|
||||
|
||||
|
||||
Steve Config:
|
||||
=============
|
||||
[Interface]
|
||||
ListenPort = 51822
|
||||
PrivateKey = OKQeBlkw7aoxtGfTlxVJpbRJqXwEzz38dk2gFShMHmI=
|
||||
Address = 10.1.40.1/32
|
||||
DNS = 10.1.3.40,10.1.3.41
|
||||
|
||||
[Peer]
|
||||
PublicKey = EsxauwYNBotyfDJzy9yCUXDci2gHbtZLhUWnMgMP0AY=
|
||||
PresharedKey = Va8qOJXqvb8GaNCLUf3yzoGYX2+wZZkKHe/d4i+/Rhs=
|
||||
Endpoint = 66.171.167.250:13233
|
||||
AllowedIPs = 10.0.0.0/8,192.168.0.0/24
|
||||
PersistentKeepalive = 25
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
add allowed-address=10.1.41.253/32,172.16.100.1/32 client-keepalive=10s comment="Router 253" interface=WG-Routers preshared-key="BqdyD7C+AyMFhs67vBjCSfL4dWe3XJ1uMDg6lLgYEe4=" public-key=\
|
||||
"UlkgLQIbXkJ2dsrik1aDvOLSQrSdPpPNVLJjejE1yRU="
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
endpoint-address=${Rtr_CCR1_Addr} endpoint-port=${Rtr_CCR1_Port}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/interface wireguard
|
||||
add listen-port=13231 mtu=1420 name=wg01 private-key="8DcsFMmQVl3JyOXNuJvSiYaTqz6AqUECOSeIMDhijEA="
|
||||
/ip address add address=10.1.41.253/32 comment=wg-wg01 interface=wg01
|
||||
|
||||
/interface wireguard peers add allowed-address=10.0.0.0/8,192.168.0.0/24 client-keepalive=10 disabled=no comment="CCR1 Montreal" interface=wg01 \
|
||||
preshared-key="BqdyD7C+AyMFhs67vBjCSfL4dWe3XJ1uMDg6lLgYEe4=" public-key="9au45IDNJhHDNtN+LIpJDyMFTEYdN9WOSSHEJS8WRmw="
|
||||
|
||||
|
||||
|
||||
|
||||
endpoint-address=66.171.167.250
|
||||