Skip to main content

Primary links

  • Home
  • AI
  • Kubernetes
  • Incus
  • Ansible
  • Terraform
  • OpenStack
  • Virtualization
  • Linux
  • SmartHome
  • HowTo

Misc

  • Linux
  • Hardware
  • Programming
  • Databases
  • Multimedia
  • Windows

Cloud

  • OpenStack
  • cloud-config
  • nextcloud

Virtualization

  • Virtualization
  • Incus
  • Docker
  • KVM
  • Kubernetes
  • LXC
  • LXD
  • QEMU
  • VMware
  • VirtualBox
  • multipass
  • podman
  • vagrant
  • XEN

Network

  • DNS
  • Firewall
  • Linux
  • OpenvSwitch
  • SSL
  • VLAN
  • VPN
  • iPXE
  • namespaces
  • nmcli
  • tcpdump

Storage

  • CEPH
  • DRBD
  • LVM
  • S3
  • ZFS
  • btrfs

Automation / CI/CD

  • Install
  • Ansible
  • GitLab
  • LLM
  • Preseed
  • Puppet
  • Terraform
  • Ubuntu autoinstall

Monitoring / Visualisation

  • Grafana
  • Icinga
  • Prometheus
  • Monitoring
  • ELK
  • mermaid

Debug VPN script

#!/bin/bash

export DEBUG=@option.debug@
export VPN_CONNECTION_ID=$(echo @option.vpn_connection_id@ | sed -e 's/^[[:space:]]*//')

[ "${DEBUG}" == "yes" ] && set -x

source /etc/kolla/admin-openrc.sh
source /usr/local/pyenv/versions/osc/bin/activate

# check parameter
if [[ ! ${VPN_CONNECTION_ID//-/} =~ ^[[:xdigit:]]{32}$ ]]; then
#if [ -z "${VPN_CONNECTION_ID}" ]; then
    echo -e "\e[34mPlease specify the VPN ipsec site connection ID"
    openstack vpn ipsec site connection list --long

    exit
fi 


VPN_CONNECTION_JSON=$(openstack vpn ipsec site connection show ${VPN_CONNECTION_ID} -f json)

echo -e "\e[34mVPN Connection:"
openstack vpn ipsec site connection show "${VPN_CONNECTION_ID}" | grep -v "Pre-shared Key"

VPN_SERVICE_ID=$(echo ${VPN_CONNECTION_JSON} | jq -r '."VPN Service"')
echo -e "\n\e[34mVPN Service:"
openstack vpn service show ${VPN_SERVICE_ID}

LOCAL_ENDPOINT_GROUP_ID=$(echo ${VPN_CONNECTION_JSON} | jq -r '."Local Endpoint Group ID"')
echo -e "\n\e[34mLocal Endpoint:"
openstack vpn endpoint group show ${LOCAL_ENDPOINT_GROUP_ID}

LOCAL_ENDPOINT_TYPE=$(openstack vpn endpoint group show ${LOCAL_ENDPOINT_GROUP_ID} -f json | jq -r '.Type')
if [ "${LOCAL_ENDPOINT_TYPE}" == "subnet" ]; then
    echo -e "\n\e[34mLocal Endpoint subnets:"
    LOCAL_ENDPOINT_SUBNETS=$(openstack vpn endpoint group show ${LOCAL_ENDPOINT_GROUP_ID} -f json | jq -r '.Endpoints[]')
    for SUBNET in ${LOCAL_ENDPOINT_SUBNETS}; do
        openstack subnet show ${SUBNET}
    done
fi

PEER_ENDPOINT_GROUP_ID=$(echo ${VPN_CONNECTION_JSON} | jq -r '."Peer Endpoint Group ID"')
echo -e "\n\e[34mPeer Endpoint:"
openstack vpn endpoint group show ${PEER_ENDPOINT_GROUP_ID}

PEER_ENDPOINT_TYPE=$(openstack vpn endpoint group show ${PEER_ENDPOINT_GROUP_ID} -f json | jq -r '.Type')
if [ "${PEER_ENDPOINT_TYPE}" == "subnet" ]; then
    echo -e "\n\e[34mPeer Endpoint subnets:"
    PEER_ENDPOINT_SUBNETS=$(openstack vpn endpoint group show ${PEER_ENDPOINT_GROUP_ID} -f json | jq -r '.Endpoints[]')
    for SUBNET in ${PEER_ENDPOINT_SUBNETS}; do
        openstack subnet show ${SUBNET}
    done
fi
debug
Profiles GitHub StackOverflow LinkedIn Xing
Contact Imprint
© panticz 2026

Cookie-Einstellungen

Diese Website nutzt eingebettete Inhalte von Drittanbietern (z.B. YouTube, SoundCloud). Beim Laden dieser Inhalte werden Daten an die jeweiligen Anbieter übermittelt. Datenverarbeitungserklärung