VPN IPsec (strongSwan)
Site-to-site and remote-access VPN using industry-standard IPsec

What is this?
VPN IPsec creates an encrypted tunnel between your edge device and a remote network using the IPsec standard built into every modern operating system. It protects data in transit without requiring changes to your existing applications.
Think of it as a locked pipe connecting two buildings — anything sent through the pipe is invisible to anyone outside it. Your PLCs, HMIs, and SCADA systems talk through this pipe as if they were on the same local network.
Important: This application requires
CAP_NET_ADMINcapability and is not fully rootless. The container must run with elevated network privileges. The host kernel must support the XFRM IPsec stack.
Example: how a factory uses it
A plant engineer needs to monitor packaging line PLCs from the central control room across town. The IPsec VPN container runs on the edge gateway at the packaging line, creating an encrypted tunnel to the control room gateway. The engineer’s SCADA workstation sees the remote PLCs as if they were on the local network — no exposed ports on the internet, no unencrypted traffic crossing the WAN link.
Network Topology
graph LR
subgraph Remote Site
SCADA[SCADA Workstation]
CLIENT[IPsec Client
10.89.1.3
tunnel: 192.168.1.10]
end
subgraph WAN
TUNNEL{Encrypted IPsec Tunnel
IKEv1 XAuth-PSK
ESP protocol}
end
subgraph Plant Edge Gateway
SERVER[IPsec Server
10.89.1.2
tunnel: 192.168.1.0/24]
PLC[Local PLCs]
SERVICES[Edge Services]
end
SCADA --> CLIENT
CLIENT -->|ESP encrypted| TUNNEL
TUNNEL -->|ESP encrypted| SERVER
SERVER --> PLC
SERVER --> SERVICES
Requires:
CAP_NET_ADMIN+ kernel XFRM stack. This application is NOT fully rootless.
Import this app
Paste this into your Margo manager to import the app:
public.ecr.aws/g2n4p2m7/belden-margo:1.2.1_vpn-ipsec-margo-manifest
Run: oras pull public.ecr.aws/g2n4p2m7/belden-margo:1.2.1_vpn-ipsec-margo-manifest
Technical details
Deployment Profiles
- PROPOSED — quadlet (WG-PROPOSAL-02)
Systemd-native deployment using Podman Quadlet unit files (PROPOSED — WG-PROPOSAL-02, not TWG-ratified). Requires CAP_NET_ADMIN capability. Designed for edge devices running BeldenOS with systemd and Podman ≥ 4.4.
Application Description (margo.yaml)
apiVersion: margo.org/v1alpha1
kind: ApplicationDescription
id: com-belden-vpn-ipsec
metadata:
name: "VPN IPsec (strongSwan)"
version: 1.2.0+vpn-ipsec-margo-manifest
description: Site-to-site and remote-access VPN using industry-standard IPsec. Requires CAP_NET_ADMIN — not fully rootless. Host kernel must support the XFRM IPsec stack. Uses IKEv1 XAuth-PSK with strongSwan on both endpoints to avoid Libreswan NAT-T interop issues.
catalog:
application:
descriptionFile: "README.md"
tagline: "Site-to-site and remote-access VPN using industry-standard IPsec"
tags:
- "vpn"
- "ipsec"
- "strongswan"
- "networking"
- "security"
- "edge-computing"
- "industrial"
organization:
- name: "Belden Inc."
site: "https://www.belden.com"
deploymentProfiles:
- id: "quadlet-v1"
type: "quadlet"
description: >-
Systemd-native deployment using Podman Quadlet unit files (PROPOSED —
WG-PROPOSAL-02, not TWG-ratified). Requires CAP_NET_ADMIN capability.
Designed for edge devices running BeldenOS with systemd and Podman ≥ 4.4.
requiredResources:
cpu:
cores: 0.1
architectures:
- amd64
- arm64
memory: "128Mi"
storage: "256Mi"
interfaces:
- type: ethernet
components:
- name: "ipsec-quadlet"
properties:
repository: oci://public.ecr.aws/g2n4p2m7/belden-margo
revision: 1.2.0_vpn-ipsec-quadlet
wait: true
timeout: "5m0s"
parameters:
# VPN Credentials
ipsecUser:
value: "belden-user"
targets:
- pointer: "IPSEC_USER"
components:
- ipsec-quadlet
ipsecPsk:
value: "OST2KU4ChZB1Jksq+dDTzwTijggLr/k8KSrtEugXFPs="
targets:
- pointer: "IPSEC_PSK"
components:
- ipsec-quadlet
ipsecPassword:
value: "rhVNOy1VPTu1yKiSvbzELVsH/mFBSiG+"
targets:
- pointer: "IPSEC_PASSWORD"
components:
- ipsec-quadlet
# VPN Network Config
localTs:
value: "10.90.0.1/32"
targets:
- pointer: "IPSEC_LOCAL_TS"
components:
- ipsec-quadlet
configuration:
sections:
- name: "VPN Credentials"
settings:
- parameter: ipsecPsk
name: "Pre-Shared Key (PSK)"
immutable: false
schema: secretSchema
- parameter: ipsecUser
name: "XAuth Username"
immutable: false
schema: usernameSchema
- parameter: ipsecPassword
name: "XAuth Password"
immutable: false
schema: secretSchema
- name: "Network"
settings:
- parameter: localTs
name: "Local Traffic Selector"
immutable: false
schema: cidrSchema
schema:
- name: secretSchema
dataType: string
allowEmpty: false
- name: usernameSchema
dataType: string
allowEmpty: false
- name: cidrSchema
dataType: string
allowEmpty: falsePodman Quadlet Units
PROPOSED — quadlet (WG-PROPOSAL-02)ipsec-server.container
[Unit]
Description=VPN IPsec (strongSwan) gateway
After=network-online.target
Wants=network-online.target
[Container]
ContainerName=ipsec
Image=public.ecr.aws/g2n4p2m7/belden-margo:1.1.0-vpn-ipsec
AddCapability=NET_ADMIN
AddCapability=NET_RAW
Network=pasta:--map-gw
Sysctl=net.ipv4.ip_forward=1
Sysctl=net.ipv4.conf.all.rp_filter=0
PublishPort=4400:4400/udp
Volume=${QUADLET_DIR}/ipsec-data/server-vpn.conf:/etc/swanctl/conf.d/server.conf:ro
Volume=${QUADLET_DIR}/ipsec-data/strongswan.conf:/etc/strongswan.conf:ro
StopTimeout=10
[Service]
Restart=on-failure
Environment=QUADLET_DIR=%E/containers/systemd
Environment=IPSEC_LOCAL_TS=10.90.0.1/32
Environment="IPSEC_PASSWORD=rhVNOy1VPTu1yKiSvbzELVsH/mFBSiG+"
Environment="IPSEC_PSK=OST2KU4ChZB1Jksq+dDTzwTijggLr/k8KSrtEugXFPs="
Environment="IPSEC_USER=belden-user"
ExecStartPre=podman run --rm --name ipsec-pre --env-host --env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -v ${QUADLET_DIR}/ipsec-data:/data docker.io/alpine:3.21 sh -c "apk add gettext-envsubst -q && envsubst < /data/server-vpn.conf.tmpl > /data/server-vpn.conf && chmod 600 /data/server-vpn.conf"
[Install]
WantedBy=default.target
Container Images
| Image Reference |
|---|
docker.io/alpine:3.21 |
public.ecr.aws/g2n4p2m7/belden-margo:1.1.0-vpn-ipsec |
License
GPLv2