macOS Guide: This guide will walk you through connecting to PremierVPN using OpenConnect on macOS. OpenConnect is a secure, open-source VPN client compatible with Cisco AnyConnect protocols.
Prerequisites
Before getting started, ensure you have:
- A Mac running macOS 10.12 (Sierra) or later
- Administrator privileges on your Mac
- An active PremierVPN account (sign up here if needed)
- Your PremierVPN credentials from your Welcome Email
- Internet connection
Available Server Locations
PremierVPN offers servers in multiple locations worldwide. Choose the server closest to you or the location you want to appear from:
Global Server List
| Country/Region | Server Address |
|---|---|
| Australia | au.premiervpn.net |
| Brazil | br.premiervpn.net |
| Canada | ca.premiervpn.net |
| France | fr.premiervpn.net |
| Germany | de.premiervpn.net |
| India | in.premiervpn.net |
| Israel | isr.premiervpn.net |
| Japan | jp.premiervpn.net |
| Mexico | mx.premiervpn.net |
| Netherlands | nl.premiervpn.net |
| Poland | pl.premiervpn.net |
| Singapore | sg.premiervpn.net |
| South Korea | sk.premiervpn.net |
| Spain | sp.premiervpn.net |
| Sweden | sw.premiervpn.net |
| United Kingdom | uk.premiervpn.net |
United States Servers
| Location | Server Address |
|---|---|
| Kansas | ks.premiervpn.net |
| New York | ny.premiervpn.net |
| Santa Clara | sc.premiervpn.net |
| Los Angeles | la.premiervpn.net |
Method 1: Using OpenConnect GUI (Recommended for Beginners)
1 Install Homebrew (if not already installed)
Homebrew is a package manager for macOS that makes installing applications easy.
- Open Terminal application:
- Press Command + Space to open Spotlight Search
- Type "Terminal" and press Enter
- Or go to Applications → Utilities → Terminal
- Copy and paste this command into Terminal and press Enter:
- Follow the on-screen instructions
- You may be prompted to enter your Mac password (password won't be visible as you type)
- Wait for the installation to complete (may take several minutes)
2 Install OpenConnect GUI
Once Homebrew is installed, install the OpenConnect GUI application:
- In Terminal, run this command:
- Wait for the installation to complete (may take a few minutes)
- You may be prompted to enter your password again
- When complete, you'll see a confirmation message
3 Launch OpenConnect GUI
- Open Spotlight Search (Command + Space)
- Type "OpenConnect"
- Click on OpenConnect-GUI to launch the application
- Alternatively, find it in your Applications folder
4 Create a New VPN Profile
- In the OpenConnect GUI window, click the + (Plus) button to create a new profile
- Fill in the profile details:
- Name: Enter a descriptive name (e.g., "PremierVPN New York" or "PremierVPN UK")
- Gateway: Enter your chosen server from the list above (e.g.,
ny.premiervpn.netoruk.premiervpn.net) - Certificate: Leave blank (not required)
- Leave all other settings at their default values
- Click Save to save the profile
5 Connect to PremierVPN
- Select your newly created profile from the list in OpenConnect GUI
- Click the Connect button
- When prompted, enter your PremierVPN Username
- Press Enter or click Next
- Enter your PremierVPN Password
- Press Enter or click OK
6 Verify Your Connection
To confirm your VPN is working correctly:
- Open your web browser
- Visit noleak.net
- Verify that your IP address shows the location of the server you connected to
- Check that no DNS or IP leaks are detected
Method 2: Using OpenConnect Command Line (Advanced Users)
1 Install OpenConnect via Homebrew
- Open Terminal application
- If you haven't installed Homebrew yet, follow Step 1 from Method 1 above
- Run this command to install OpenConnect:
- Wait for the installation to complete
2 Connect to PremierVPN Using Command Line
To connect to a PremierVPN server, use this command format:
ny.premiervpn.net with your preferred server from the server list above.Command Breakdown:
sudo- Runs the command with administrator privileges (required for VPN connections)openconnect- The OpenConnect VPN client--protocol=anyconnect- Specifies the AnyConnect protocolny.premiervpn.net- The VPN server address
3 Enter Your Credentials
After running the command, you'll be prompted to authenticate:
- First, you'll be asked for your Mac password (for sudo access)
- Then, enter your PremierVPN Username and press Enter
- Enter your PremierVPN Password and press Enter
- The VPN connection will be established
4 Keep VPN Running
The VPN connection will stay active in the current Terminal window. To keep it running:
- Do not close the Terminal window
- Do not press Ctrl + C (this will disconnect)
- You can minimize the Terminal window and continue working
5 Disconnect from VPN
To disconnect from the VPN:
- Go to the Terminal window where OpenConnect is running
- Press Ctrl + C
- The VPN connection will terminate
Advanced: Creating a Connection Script
For convenience, you can create a script to connect to your preferred server quickly:
Step 1: Create the Script File
Step 2: Add the Script Content
Copy and paste this into the nano editor (replace with your preferred server):
Step 3: Save the File
- Press Ctrl + X to exit
- Press Y to confirm saving
- Press Enter to confirm the filename
Step 4: Make the Script Executable
Step 5: Run Your Script Anytime
Now you can connect to your VPN with a single command:
Advanced Command Line Options
Here are some useful OpenConnect flags you can add to your commands:
| Flag | Description | Example |
|---|---|---|
--user=USERNAME |
Specify username to skip manual entry | --user=myusername |
--background |
Run VPN in background | --background |
--reconnect-timeout=SECONDS |
Auto-reconnect if connection drops | --reconnect-timeout=60 |
--verbose |
Show detailed connection logs | --verbose |
--pid-file=/path/to/file |
Save process ID to file (useful for scripting) | --pid-file=/tmp/vpn.pid |
Full Example with Multiple Flags:
Method 3: Using macOS Built-in VPN (Alternative)
1 Open Network Settings
- Click the Apple menu () in the top-left corner
- Select System Settings (macOS 13+) or System Preferences (older macOS)
- Click Network
- In the left sidebar, click the + button at the bottom to add a new connection
2 Create VPN Connection
In the dialog that appears, configure the following:
- Interface: Select VPN
- VPN Type: Select IKEv2
- Service Name: Enter a descriptive name (e.g., "PremierVPN New York")
Click Create to continue.
3 Configure Server Settings
In the VPN configuration screen:
- Server Address: Enter your chosen server from the list above (e.g.,
ny.premiervpn.net) - Remote ID: Enter the same server address
- Local ID: Leave blank
4 Configure Authentication
- Click Authentication Settings... button
- Select Username as the authentication method
- Enter your PremierVPN Username
- Enter your PremierVPN Password
- Click OK to save authentication settings
5 Enable Menu Bar Access (Optional but Recommended)
- Check the box for "Show VPN status in menu bar"
- This allows you to quickly connect/disconnect from the menu bar
6 Connect to VPN
- Click Connect button in the Network settings
- Wait for the connection to establish
- Once connected, you'll see "Connected" status
7 Disconnect from VPN
To disconnect:
- From Menu Bar: Click VPN icon → Click Disconnect
- From Network Settings: Go to Network settings → Select your VPN → Click Disconnect
Verification and Testing
Verify Your VPN Connection
- Open your web browser
- Visit noleak.net
- Confirm your IP address shows the location of the server you connected to
- Verify there are no DNS leaks or IP leaks detected
- All tests should show green checkmarks
Test Connection Speed
To check your VPN connection speed:
- Visit speedtest.net
- Click Go to start the speed test
- Compare results with your normal connection speed
- If speeds are significantly slower, try connecting to a different server location
Managing Your VPN Connection
Disconnecting from VPN
OpenConnect GUI Method:
- Open the OpenConnect GUI application
- Click the Disconnect button
- The VPN will immediately disconnect
Command Line Method:
- Go to the Terminal window running OpenConnect
- Press Ctrl + C
- The VPN connection will terminate
macOS Native VPN Method:
- Click the VPN icon in your menu bar
- Click Disconnect
- Or go to Network settings and click Disconnect
Switching Servers
OpenConnect GUI Method:
- Disconnect from your current server
- Select a different profile from your saved profiles
- Or edit an existing profile to change the gateway
- Click Connect
Command Line Method:
- Disconnect (Press Ctrl + C)
- Run the connection command with a new server address
- Example:
sudo openconnect --protocol=anyconnect uk.premiervpn.net
macOS Native VPN:
- Create multiple VPN profiles for different servers
- Switch between them from Network settings or menu bar
Auto-Reconnect
OpenConnect GUI:
- In profile settings, enable "Auto-reconnect" option
- VPN will automatically reconnect if connection drops
Command Line:
- Add
--reconnect-timeout=60flag to your command - Example:
Connection on Startup
OpenConnect GUI:
- Enable "Start minimized" and "Connect on start" in preferences
- Add OpenConnect to Login Items in System Settings
macOS Native VPN:
- In VPN settings, check "Connect on demand"
- VPN will auto-connect when needed
Troubleshooting
Common Issues and Solutions
Connection Fails
Solutions:
- Double-check your username and password
- Verify you're using the correct server address
- Try a different server location
- Check your internet connection is working
- Temporarily disable macOS Firewall (System Settings → Network → Firewall)
- Ensure you're running OpenConnect with
sudo(command line) - Restart your Mac and try again
Slow Connection Speeds
Solutions:
- Connect to a server closer to your physical location
- Try different server locations to find the fastest one
- Close bandwidth-intensive applications
- Restart your router/modem
- Check if your ISP is throttling VPN connections
- Test your base internet speed without VPN for comparison
DNS Leaks or IP Leaks
Solutions:
- Flush DNS cache by running this command in Terminal:
- Change your DNS servers to:
- Primary: 8.8.8.8
- Secondary: 8.8.4.4
- Disconnect and reconnect to VPN
- Test again at noleak.net
Permission Denied Errors
Solutions:
- Always use
sudowith OpenConnect command line - Verify you have administrator privileges on your Mac
- Check System Settings → Privacy & Security
- Allow OpenConnect in Security settings if blocked
- Make sure OpenConnect has Network Extension permissions
macOS-Specific Issues
Gatekeeper Blocking OpenConnect:
- Go to System Settings → Privacy & Security
- Scroll down to the Security section
- Click "Open Anyway" next to the OpenConnect message
- Confirm by clicking "Open" in the dialog
Network Extension Not Loading:
- Restart your Mac after installing OpenConnect
- Go to System Settings → Network
- Remove and re-add the VPN connection
- Try reinstalling OpenConnect:
brew reinstall openconnect-gui
Homebrew Command Not Found:
- Verify Homebrew is installed:
brew --version - If not found, reinstall Homebrew using the command in Step 1
- Add Homebrew to your PATH by running:
Certificate Warnings:
- If you see certificate warnings, they can usually be safely accepted for PremierVPN servers
- OpenConnect will ask you to verify the certificate fingerprint
- Type "yes" to accept and continue
Connection Drops Frequently:
- Enable auto-reconnect in OpenConnect settings
- Use the
--reconnect-timeout=60flag for command line - Check if your Mac is going to sleep (disable in Energy Saver settings)
- Ensure "Prevent computer from sleeping automatically" is checked
Still Need Help?
If you continue experiencing issues after trying these solutions:
- Check our other knowledgebase articles for more specific troubleshooting
- Contact PremierVPN support with the following information:
- Your macOS version (Click Apple menu → About This Mac)
- Which connection method you're using (GUI, CLI, or native VPN)
- The server address you're trying to connect to
- Complete error messages (take a screenshot if possible)
- What troubleshooting steps you've already tried
- Submit a support ticket through your client area with all relevant details
Security Best Practices
Keep Your VPN Secure and Optimized:
- Always verify your connection - Visit noleak.net after connecting to confirm no leaks
- Use kill switch features - Enable in OpenConnect GUI to prevent data leaks if VPN drops
- Choose appropriate servers - Select servers close to you for speed, or in specific locations for geo-unblocking
- Keep software updated - Regularly update OpenConnect with:
brew upgrade openconnect - Never share credentials - Your VPN username and password are for your use only
- Enable auto-reconnect - Prevents connection drops from leaving you unprotected
- Use secure DNS - Configure 8.8.8.8 and 8.8.4.4 as your DNS servers
- Monitor your connection - Check connection status regularly in menu bar or OpenConnect GUI
- Create multiple profiles - Set up profiles for different servers for easy switching
- Test after updates - Verify VPN works correctly after macOS updates
Quick Reference
Common Commands Cheat Sheet
| Action | Command |
|---|---|
| Install Homebrew | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" |
| Install OpenConnect GUI | brew install --cask openconnect-gui |
| Install OpenConnect CLI | brew install openconnect |
| Connect to VPN (CLI) | sudo openconnect --protocol=anyconnect SERVERNAME.premiervpn.net |
| Connect with Auto-reconnect | sudo openconnect --protocol=anyconnect --reconnect-timeout=60 SERVERNAME.premiervpn.net |
| Disconnect VPN (CLI) | Press Ctrl + C in Terminal |
| Update OpenConnect | brew upgrade openconnect |
| Flush DNS Cache | sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder |
| Check macOS Version | sw_vers |
You're All Set!
You now have everything you need to connect to PremierVPN on your Mac using OpenConnect. Choose the method that works best for you:
- Beginners: Use OpenConnect GUI for the easiest experience
- Advanced Users: Use Command Line for automation and control
- Simple Setup: Use macOS Native VPN for basic needs
Need Additional Assistance?
Contact our support team through your client area or submit a support ticket for personalized help with your PremierVPN setup on macOS.
