ezvpnguides

The macOS and iOS app

One SwiftUI app for macOS and iOS that connects to an ezvpn server. It keeps saved profiles, one per server, connects one at a time, and runs a dual-stack split tunnel: the server's gateway is always routed, plus the IPv4 and IPv6 ranges you add. On macOS it also sits in the menu bar. On iOS it can send DNS for chosen domains through the tunnel.

Before you start

You need:

  • An Apple Silicon Mac running macOS 15 or later, or a device running iOS 17 or later.
  • A running ezvpn server. See Set up a server. To reach a whole LAN behind it, not just the server, see Reach the whole site LAN.
  • The server's endpoint ID. The server prints it when it starts (or see Server node id). The app calls it the Server node id.
  • Access to the server's authorized_keys file. The app makes its own key; its public line goes in that file, with an optional name after it:
authorized_keys
ed25519-pub:AAAA...  this mac

The server reads that file when it starts, so restart it after you add a line.

Install on macOS

The Mac app is a signed, notarized disk image for Apple Silicon.

  1. Download ezvpn.dmg from the latest release.
  2. Open it and drag ezvpn to Applications. It must run from /Applications, or macOS won't install its network extension.
  3. Launch ezvpn. On the first launch an orange banner asks you to allow the network extension. Click Open System Settings and allow it, under GeneralLogin Items & Extensions on recent releases or Privacy & Security on older ones.
First launch on macOS: the request to use a network extension, over the in-app banner. Screenshots on this page were taken with the Mac app 0.0.22 on core 0.0.76, as its footer shows.

To update, install a newer release the same way.

Install on iOS

There is no App Store build. You build the app from source and sign it under your own paid Apple Developer team, since a VPN app needs Apple's Network Extension entitlement. The steps are in Building & running in the repo. The tunnel does not run in the iOS Simulator.

Make an auth key

Keys live in one list shared by all profiles, stored in the Keychain.

  1. On the profile list, click the key button, Auth keys.
  2. Click +, choose Generate New Key…, name the key (for example "this mac") and click Generate.
  3. Open the key's … menu and choose Copy Public Key. Add that ed25519-pub:… line to the server's authorized_keys file and restart the server.
Auth Keys with one key and its public key line.

To reuse a key from another device or from flexaccess-keys generate-auth-key, choose Enter Existing Key… and paste its ed25519-sec:… secret. The key menu also has Copy Secret Key…, Rename… and Delete….

Add a profile

Click + (Add profile) on the profile list. Fill in a Name (for example "work"), the Server node id, and the Auth key to connect with. Optionally add IPv4 routes and IPv6 routes: comma-separated CIDRs to send through the tunnel, such as 10.0.0.0/8 or fd00::/8. The server's gateway is always routed. The relay fields are only for custom relays, and the DNS fields are for split DNS on iOS.

New Profile: name, server node id, auth key and its public key.
Further down: custom relays and the IPv4 routes.

Click Save. The first time, the system asks whether ezvpn may add VPN configurations; allow it.

The first save asks to add VPN configurations: click Allow.

Don't add a route that overlaps the network the device is on; see Network changes and local networks. To change a profile, disconnect it, open it and click Edit.

Connect and disconnect

Turn on the switch on a profile's row, or open the profile and click Connect. Only one profile connects at a time: turning on a second one disconnects the first. Disconnect, or the row's switch, takes the tunnel down. If the tunnel ends on its own, the reason is shown in red under the status. Each status is explained in Connection states.

The macOS menu bar

On macOS, the menu-bar icon connects and disconnects each profile. Closing the main window keeps the menu bar and any connected tunnel running; Open ezvpn brings the window back.

The menu bar menu while home is connected.

Active routes and the connection path

While a profile is connected, its screen shows Active routes: the addresses the server assigned, the routes sent into the tunnel, and the bypass routes, the relay and server addresses kept out of the tunnel so its own traffic is never captured. Connection path… shows whether the server is reached directly or through a relay, and the health of any custom relays.

A connected profile: status, assigned address and routes.
Connection path…: the relay and the direct path in use.

Custom relays

Leave Relay URLs blank to use the default relays. If the server runs on its own relays:

  • Relay URLs: comma-separated, every relay the server is configured with. A missing one makes connects from outside the LAN time out.
  • Relay token: optional, if the relays require one.
  • QUIC address discovery: turn it off for relays behind a Cloudflare Tunnel or another HTTP-only front.

Split DNS on iOS

Under Split DNS (conditional forwarding), set DNS servers (comma-separated IP addresses inside a tunnel route, for example 10.0.0.53) and Match domains (for example corp.example). Names under the match domains resolve through those servers over the tunnel; everything else keeps the network's normal DNS. With servers but no match domains, all DNS goes through the servers.

The macOS app has no DNS settings and leaves the Mac's DNS configuration as it is.

Network changes and local networks

Reconnect by hand after a network change. Switching Wi-Fi or cellular, or losing the network, disconnects the tunnel with "network changed, disconnected". Connect again on the new network. A session lost for another reason, such as a server restart, is retried in place.

Routes that overlap the local network are refused. A route such as 192.168.0.0/16 while on a 192.168.1.0/24 Wi-Fi would cut off the LAN, so the tunnel does not start. Narrow the route, or use a server network that does not clash with the networks you connect from.

Troubleshooting

MessageWhat to do
network changed, disconnectedConnect again.
refusing to start: split-tunnel route … overlaps current network …See Network changes and local networks.
connect failed: …Check the Server node id, that the server is running, and that this key's public line is in its authorized_keys.
The running tunnel extension is …, but this app is …On macOS, click Update extension on the banner, and restart the Mac if it stays. On iOS, disconnect, then quit and reopen ezvpn.

On macOS, watch the tunnel's log in Terminal with:

log stream --predicate 'subsystem == "ezvpn.PacketTunnel"' --level debug