惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

IT之家
IT之家
Y
Y Combinator Blog
T
Tailwind CSS Blog
G
Google Developers Blog
博客园 - Franky
Google DeepMind News
Google DeepMind News
阮一峰的网络日志
阮一峰的网络日志
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 聂微东
爱范儿
爱范儿
博客园 - 【当耐特】
腾讯CDC
T
The Blog of Author Tim Ferriss
MongoDB | Blog
MongoDB | Blog
H
Help Net Security
C
Check Point Blog
大猫的无限游戏
大猫的无限游戏
M
MIT News - Artificial intelligence
博客园_首页
Stack Overflow Blog
Stack Overflow Blog
The GitHub Blog
The GitHub Blog
Engineering at Meta
Engineering at Meta
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
A safer OpenConnect workflow for Cisco AnyConnect VPNs on...
Sorin-Doru Ipate · 2026-06-14 · via DEV Community

A safer OpenConnect workflow for Cisco AnyConnect VPNs on macOS and Linux

If your organization uses Cisco AnyConnect, GlobalProtect, Pulse Secure, Juniper, or another SSL VPN, the official desktop client is often the default option.

But for developers, consultants, DevOps engineers, and support teams working on macOS or Linux, a terminal-first workflow is often faster, clearer, and easier to automate.

That is why many technical users rely on OpenConnect.

OpenConnect is a powerful open-source VPN client, but raw usage can become repetitive when you work across multiple environments.

A typical command might look like this:

sudo openconnect --protocol=anyconnect \
  --authgroup=Employees \
  --user=your.username \
  --servercert pin-sha256:... \
  vpn.example.com

It works, but it is not always a good daily workflow.

No named profiles.
No convenient way to manage multiple gateways.
No structured secret storage.
No simple status command.
No guided certificate pinning.
No easy auto-reconnect setup.
No smoother handling of Duo 2FA.

That is the gap VPN Up for OpenConnect is designed to fill.

GitHub repo:
https://github.com/sorinipate/vpn-up-for-openconnect

What VPN Up is

VPN Up is a secure, scriptable command-line VPN manager built on top of OpenConnect for macOS and Linux.

It is not a replacement for OpenConnect. It is a safer and more convenient workflow around it.

Instead of assembling long commands repeatedly, you define VPN profiles once and connect by name:

vpn-up start "Frankfurt VPN"

Example workflow:

$ vpn-up start "Frankfurt VPN"
Starting the Frankfurt VPN on frankfurt.example.com using Cisco AnyConnect ...
Connecting with Two-Factor Authentication (2FA) from Duo (PUSH) ...
Connected to Frankfurt VPN

$ vpn-up status
VPN is running (PID: 88933)
  Profile : Frankfurt VPN
  Gateway : frankfurt.example.com
  Uptime  : 08:47

Features that matter

VPN Up adds the things I wanted in my daily OpenConnect workflow:

  • Named VPN profiles
  • Cisco AnyConnect, GlobalProtect, Pulse Secure, Juniper, and ocserv support through OpenConnect
  • Duo 2FA support from the terminal
  • Secure password storage
  • Certificate pinning with pin-sha256
  • Auto-reconnect at login using launchd on macOS or systemd on Linux
  • Profile-aware status, logs, and stop commands
  • Shell completion
  • A doctor command for diagnostics
  • Connect and disconnect hooks

Secure secrets, not plaintext passwords

A VPN helper should not make security worse in the name of convenience.

VPN Up stores secrets using secure storage mechanisms where possible:

  • macOS Keychain on macOS
  • Linux Secret Service / keyring on Linux
  • Encrypted OpenSSL vault as a fallback

It avoids storing VPN passwords in plaintext configuration files and avoids passing secrets directly on the command line.

That matters because command-line convenience often turns into unsafe credential handling over time.

Certificate pinning

VPN access depends not only on credentials, but also on server identity.

VPN Up supports pin-sha256 certificate pinning:

vpn-up pin --save "Frankfurt VPN"

If no pin is configured, the gateway certificate must validate against the system trust store.

The principle is simple: avoid silently accepting weak or unexpected trust conditions.

Auto-reconnect

Some VPN sessions need to stay alive during longer work:

  • Remote support
  • Integration troubleshooting
  • System monitoring
  • Data migration
  • Deployment support

VPN Up can install a user-level login service:

vpn-up service install "Work VPN"

On macOS this uses launchd.
On Linux this uses systemd.

Installation

With Homebrew:

brew tap sorinipate/vpn-up
brew install vpn-up

Then:

vpn-up setup
vpn-up add-profile
vpn-up start

After setup, daily usage becomes simple:

vpn-up start "Client VPN"
vpn-up status
vpn-up logs -f
vpn-up stop

Who it is for

VPN Up may be useful if you:

  • Use OpenConnect instead of a vendor VPN client
  • Connect to Cisco AnyConnect-compatible gateways
  • Work with GlobalProtect, Pulse Secure, Juniper, or ocserv VPNs
  • Manage multiple VPN profiles
  • Need Duo 2FA from the command line
  • Want VPN secrets stored securely
  • Need certificate pinning
  • Prefer terminal-first workflows
  • Need auto-reconnect at login

It is especially relevant for developers, consultants, DevOps engineers, implementation teams, and support teams working across multiple client networks.

Try it

VPN Up for OpenConnect is open source and available on GitHub:

https://github.com/sorinipate/vpn-up-for-openconnect

Stars, issues, and pull requests are welcome.

If you already use OpenConnect but want better profile management, Duo 2FA handling, secure secrets, certificate pinning, diagnostics, and auto-reconnect, VPN Up may provide a safer and more structured workflow.