<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sorin-Doru Ipate</title>
    <description>The latest articles on DEV Community by Sorin-Doru Ipate (@sorinipate).</description>
    <link>https://dev.to/sorinipate</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3983180%2Fa7779b17-f2fb-4849-9152-14fbd5054ee6.jpeg</url>
      <title>DEV Community: Sorin-Doru Ipate</title>
      <link>https://dev.to/sorinipate</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sorinipate"/>
    <language>en</language>
    <item>
      <title>A safer OpenConnect workflow for Cisco AnyConnect VPNs on macOS and Linux</title>
      <dc:creator>Sorin-Doru Ipate</dc:creator>
      <pubDate>Sat, 13 Jun 2026 20:53:43 +0000</pubDate>
      <link>https://dev.to/sorinipate/a-safer-openconnect-workflow-for-cisco-anyconnect-vpns-on-macos-and-linux-5g7o</link>
      <guid>https://dev.to/sorinipate/a-safer-openconnect-workflow-for-cisco-anyconnect-vpns-on-macos-and-linux-5g7o</guid>
      <description>&lt;h1&gt;
  
  
  A safer OpenConnect workflow for Cisco AnyConnect VPNs on macOS and Linux
&lt;/h1&gt;

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

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;That is why many technical users rely on OpenConnect.&lt;/p&gt;

&lt;p&gt;OpenConnect is a powerful open-source VPN client, but raw usage can become repetitive when you work across multiple environments.&lt;/p&gt;

&lt;p&gt;A typical command might look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;openconnect &lt;span class="nt"&gt;--protocol&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;anyconnect &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--authgroup&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;Employees &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--user&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your.username &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--servercert&lt;/span&gt; pin-sha256:... &lt;span class="se"&gt;\&lt;/span&gt;
  vpn.example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It works, but it is not always a good daily workflow.&lt;/p&gt;

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

&lt;p&gt;That is the gap &lt;strong&gt;VPN Up for OpenConnect&lt;/strong&gt; is designed to fill.&lt;/p&gt;

&lt;p&gt;GitHub repo:&lt;br&gt;
&lt;a href="https://github.com/sorinipate/vpn-up-for-openconnect" rel="noopener noreferrer"&gt;https://github.com/sorinipate/vpn-up-for-openconnect&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  What VPN Up is
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;VPN Up&lt;/strong&gt; is a secure, scriptable command-line VPN manager built on top of OpenConnect for macOS and Linux.&lt;/p&gt;

&lt;p&gt;It is not a replacement for OpenConnect. It is a safer and more convenient workflow around it.&lt;/p&gt;

&lt;p&gt;Instead of assembling long commands repeatedly, you define VPN profiles once and connect by name:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;vpn-up start &lt;span class="s2"&gt;"Frankfurt VPN"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example workflow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;vpn-up start &lt;span class="s2"&gt;"Frankfurt VPN"&lt;/span&gt;
Starting the Frankfurt VPN on frankfurt.example.com using Cisco AnyConnect ...
Connecting with Two-Factor Authentication &lt;span class="o"&gt;(&lt;/span&gt;2FA&lt;span class="o"&gt;)&lt;/span&gt; from Duo &lt;span class="o"&gt;(&lt;/span&gt;PUSH&lt;span class="o"&gt;)&lt;/span&gt; ...
Connected to Frankfurt VPN

&lt;span class="nv"&gt;$ &lt;/span&gt;vpn-up status
VPN is running &lt;span class="o"&gt;(&lt;/span&gt;PID: 88933&lt;span class="o"&gt;)&lt;/span&gt;
  Profile : Frankfurt VPN
  Gateway : frankfurt.example.com
  Uptime  : 08:47
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Features that matter
&lt;/h2&gt;

&lt;p&gt;VPN Up adds the things I wanted in my daily OpenConnect workflow:&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Secure secrets, not plaintext passwords
&lt;/h2&gt;

&lt;p&gt;A VPN helper should not make security worse in the name of convenience.&lt;/p&gt;

&lt;p&gt;VPN Up stores secrets using secure storage mechanisms where possible:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;macOS Keychain on macOS&lt;/li&gt;
&lt;li&gt;Linux Secret Service / keyring on Linux&lt;/li&gt;
&lt;li&gt;Encrypted OpenSSL vault as a fallback&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It avoids storing VPN passwords in plaintext configuration files and avoids passing secrets directly on the command line.&lt;/p&gt;

&lt;p&gt;That matters because command-line convenience often turns into unsafe credential handling over time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Certificate pinning
&lt;/h2&gt;

&lt;p&gt;VPN access depends not only on credentials, but also on server identity.&lt;/p&gt;

&lt;p&gt;VPN Up supports &lt;code&gt;pin-sha256&lt;/code&gt; certificate pinning:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;vpn-up pin &lt;span class="nt"&gt;--save&lt;/span&gt; &lt;span class="s2"&gt;"Frankfurt VPN"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If no pin is configured, the gateway certificate must validate against the system trust store.&lt;/p&gt;

&lt;p&gt;The principle is simple: avoid silently accepting weak or unexpected trust conditions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Auto-reconnect
&lt;/h2&gt;

&lt;p&gt;Some VPN sessions need to stay alive during longer work:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Remote support&lt;/li&gt;
&lt;li&gt;Integration troubleshooting&lt;/li&gt;
&lt;li&gt;System monitoring&lt;/li&gt;
&lt;li&gt;Data migration&lt;/li&gt;
&lt;li&gt;Deployment support&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;VPN Up can install a user-level login service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;vpn-up service &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="s2"&gt;"Work VPN"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On macOS this uses &lt;code&gt;launchd&lt;/code&gt;.&lt;br&gt;
On Linux this uses &lt;code&gt;systemd&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;With Homebrew:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew tap sorinipate/vpn-up
brew &lt;span class="nb"&gt;install &lt;/span&gt;vpn-up
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;vpn-up setup
vpn-up add-profile
vpn-up start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After setup, daily usage becomes simple:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;vpn-up start &lt;span class="s2"&gt;"Client VPN"&lt;/span&gt;
vpn-up status
vpn-up logs &lt;span class="nt"&gt;-f&lt;/span&gt;
vpn-up stop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Who it is for
&lt;/h2&gt;

&lt;p&gt;VPN Up may be useful if you:&lt;/p&gt;

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

&lt;p&gt;It is especially relevant for developers, consultants, DevOps engineers, implementation teams, and support teams working across multiple client networks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;VPN Up for OpenConnect is open source and available on GitHub:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/sorinipate/vpn-up-for-openconnect" rel="noopener noreferrer"&gt;https://github.com/sorinipate/vpn-up-for-openconnect&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Stars, issues, and pull requests are welcome.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

</description>
      <category>vpn</category>
      <category>openconnect</category>
      <category>cli</category>
      <category>security</category>
    </item>
  </channel>
</rss>
