You can set up PrivateVPN on Ubuntu via the Linux Network Manager or the OpenVPN client configuration. Alternatively, you have the PrivateVPN AnyConnect and WireGuard setups for Ubuntu.
Ubuntu users who only want browser-side protection can install the PrivateVPN proxy in their Chrome or Firefox browsers.
Most of these setups require running specific command lines in your Ubuntu terminal.
Don’t worry! I’ll show you the exact steps to set up PrivateVPN for Ubuntu, teach you how to disconnect from the VPN under each method, and share terminal commands to uninstall the VPN package.
How to Set Up PrivateVPN on Ubuntu via Network Manager?
Setting up PrivateVPN via the Ubuntu Network Manager entails installing a PrivateVPN server certificate into the Linux distro.
You can connect via OpenVPN, L2TP protocols, or OpenConnect using this method.
OpenVPN (UDP & TCP) Method
OpenVPN is the more reliable PrivateVPN protocol for using the Network Manager. Follow the steps below to get it done right:
- Get a PrivateVPN account. Grab these one-time PrivateVPN deals before they expire.

- Download a preferred PrivateVPN OpenVPN configuration file. You can access the list of UDP (faster) and TCP (better stability) servers below.
- I’ll download the Australia – Melbourne UDP server configuration for this demo. You can choose a nearby server (for low gaming ping or online security) or a foreign server (to unblock content).

- Launch your Ubuntu terminal. You can get this through the apps, searching for the terminal, or holding Ctrl + Alt + T keys on your keyboard.
- Run the command line below to install the OpenVPN network manager.
- Even if you’ve installed the network manager, I recommend rerunning the command to ensure you use the latest version.
sudo apt-get install network-manager-openvpn network-manager-openvpn-gnome resolvconf

- Input your password, if requested, then click Enter. Note that the cursor won’t move while you’re entering your password.

- Once successfully installed, click the Ubuntu system status tray. It’s in the upper right corner of your screen.

- Click VPN Off > VPN Settings.
- Alternatively, if you’ve never set up any other VPN, click Wired Connected > Wired Settings.

- Click the “+” sign in front of “VPN.”

- Click “Import from file.”

- Open the folder where you downloaded the server configuration from Step 3. That’s “Downloads,” in my case.

- Select the server file, then click “Open.”
- Optional: Change the network name to anything you want. I’ll use “AU Server” to quickly identify it later.

- Enter your PrivateVPN account username and password in the pop-up screen. Click “Add.”
- Click the greyed-out icon to connect to the server.

- Test for leaks to ensure you’re getting the server IP address.

- You can now browse the web securely, connect to gaming peers across PrivateVPN’s 63 server locations, and download torrents without alerting your ISP!

L2TP Method
The PrivateVPN-Ubuntu L2TP Network Manager setup might offer slightly faster speeds than its OpenVPN counterpart. However, you’re trading reliable encryption.
So, don’t use this method for sensitive tasks like accessing banking platforms over public Wi-Fi or downloading torrents.
That said, here are the steps:
- You’ll need a PrivateVPN account. Use these discounts to save on your first subscription.

- Launch your Ubuntu terminal.
- Run the command below to install the L2TP network manager.
sudo apt-get install network-manager-l2tp network-manager-l2tp-gnome

- Enter your Ubuntu admin password and press Enter if prompted.
- Press Y. Then, press Enter to continue.

- Once downloaded, access the PrivateVPN server list here.
- Copy a server address to the IP address you want. I’ll copy the Belgium server address for this guide.

- Click the Ubuntu systems tray, then click Wired Connected > Wired Settings.

- Click the “+” sign in front of “VPN.”

- Click “Layer 2 Tunneling Protocol (L2TP).”

- Give the connection any name you please. I named mine “Belgium PrivateVPN Server.”

- Fill in the remainder of the details below:
- Gateway – The server address you copied in Step 7.
- Username – Your PrivateVPN account email address.
- Password – Your PrivateVPN account password.

- Next, click “IPsec Settings.”
- Check “Enable IPsec tunnel to L2TP host.”

- Enter “privatvpn” in the “Pre-shared key” field. Please note that this is “PrivateVPN” without the “e” and in all lowercase letters.
- Click “OK.”
- Click “Add.”

- Toggle the created L2TP connection name (from Step 11) to connect to the VPN server.

- Test for leaks. If successful, you should get an IP address from the connected server.

- Watch Netflix US abroad, unblock BBC iPlayer outside the UK, download P2P files faster without ISP internet throttling, and enjoy your PrivateVPN-assigned IP address for anything else on Ubuntu!

AnyConnect Method
AnyConnect is built on the open-source OpenConnect, allowing you to create a private VPN with preferred server libraries. It often uses UDP, which makes it faster than OpenVPN TCP.
Here’s how to set it up:
- You need a PrivateVPN account to use with AnyConnect. Get one via these discount offers.
- Go to the PrivateVPN AnyConnect server list (here) and copy a preferred server address. I’ll use the France server for this example.

- Launch your Ubuntu terminal.
- Run the command below to download the OpenConnect manager to your Ubuntu system.
sudo apt-get install openconnect network-manager-openconnect network-manager-openconnect-gnome

- Press Y, then the Enter key if prompted.

- Once downloaded, click the systems status tray to access the Network Manager.

- Click Wired Connected > Wired Settings.
- Click the “+” sign against “VPN.”

- Select “Multi-protocol VPN client (openconnect).”

- Set any name for the connection. I’ll use “France AnyConnect Server” for easy referencing.

- Enter the server address you copied in Step 2 as “Gateway.”
- Leave the other settings as is, then click “Add.”
- Toggle the VPN connection you just created.

- Enter your PrivateVPN account username (email address) in the pop-up box. Then, click “Login.”

- Enter your PrivateVPN account password in the next popup box. Click “Login” again.

- Optional: You can toggle the “Save passwords” option.
- Test for leaks to ensure you’re browsing with the VPN-assigned IP address.

- Start unblocking choice content, keep your IP hidden on untrusted networks or download torrents faster without ISP throttling on your Ubuntu system.

How to Set Up PrivateVPN on Ubuntu via the OpenVPN Client?
While you can already access PrivateVPN’s OpenVPN protocols on the Network Manager, the OpenVPN client is another way to connect to its servers on this protocol.
This setup method is handy for users who prefer the Ubuntu OpenVPN client or can’t get other setups to work for them.
Follow these steps:
- Not yet a PrivateVPN subscriber? Grab these discounts to get an account now.
- Install the OpenVPN client by running the command below.
sudo apt-get install openvpn curl

- Enter your Ubuntu system password if promoted.

- Press Y, then press the Enter key to continue the download.
- Download a preferred PrivateVPN OpenVPN server configuration. You can follow the links below to get the TCP or UDP option.
- Once downloaded, open the file path via your terminal by running the command below. Skip to step 13 if you know how to get the path folder.
sudo openvpn_path of the configuration file
-
- In my case, the command is [sudo openvpn /home/ochristopher/Downloads/PrivateVPN-IT-Milan-TUN-1194.ovpn].

- Optional: If you’re unsure of the path folder, locate the download. Mine is in the “Downloads” folder.
- Right-click the download, then select “Properties.”

- Copy the text in front of the “Parent folder” and paste it after [sudo openvpn] in the terminal.

- Return to the downloads folder to copy the file name.
- Return to the terminal, put a forward slash before the pending command, then paste the file name copied from Step 10.

- Press Enter.
- You’ll be asked to enter your username. Put your PrivateVPN login email address here, then press Enter.

- You’ll be prompted to enter your password. Write your PrivateVPN login password, then press Enter.

- Wait for the message “Initialization Sequence Completed.”

- Test for leaks to ensure you have the VPN server’s IP address. My leak test returned the Italy server I connected to in this case.

- Keep your Ubuntu code transfers private, lockout snoopy network admins spying on your activities, unblock geo-restricted content anywhere, and enjoy safe torrenting on your Ubuntu.

How to Set Up PrivateVPN WireGuard on Ubuntu?
PrivateVPN doesn’t offer WireGuard on its Windows, Mac, and smartphone apps. However, Ubuntu users get this relatively lightweight and ultra-fast protocol!
Here’s how to set it up:
- Got a PrivateVPN account already? You’re in luck with these discounts.
- Go to the PrivateVPN website.
- Click “My Account.”

- Log in with your username and password.

- Click “Control Panel.”

- Scroll to “Wireguard config,” then click the dropdown menu to choose a server. I’ll use the Mexico – Mexico City server for this demo.

- Click “Generate Config” after choosing a server.

- Download the generated configuration file.

- Go to your Ubuntu terminal.
- Run the command line below to install WireGuard on your Ubuntu.
sudo apt install wireguard
- Enter your password if prompted.

- Press “Y” (for Yes) if prompted, then press Enter.

- Wait for the download to complete.
- Then, run the command line below to invoke the downloaded configuration file (from Step 8) via the file’s path.
sudo wg-quick up_wireguard file path
- Follow steps 7-11 from the OpenVPN client setup above to get and use the proper file path. In my case, it’s [sudo wg-quick up /home/ochristopher/Downloads/wireguard.conf].

- You should now be connected.
- Test for leaks to be extra sure.

- Enjoy your WireGuard-enabled PrivateVPN server for fast gaming speeds, robust DDoS protection on games like CS2, and HD content unblocking.

How to Install PrivateVPN Browser Extensions on Ubuntu?
PrivateVPN doesn’t have browser extensions. However, there’s a workaround to use its proxy setup in Google Chrome, Edge, and Mozilla Firefox browsers.
Here’s what to do:
- Buy a PrivateVPN account if you don’t have one. Here are some discount offers for you.
- Launch your browser. I’ll use Google Chrome for this demo.
- Go to the PrivateVPN server list and copy a server address. I’ll use the Germany – Berlin server for this demonstration.

- Next, go to the PrivateVPN website.
- Click “My Account.”

- Login with your account username and password.

- Click “Control panel.”

- Scroll to “Proxy login.”

- Copy the username for later. The proxy password is the same as your PrivateVPN login password.
- Go to your browser’s extensions store. That’s the Chrome Web Store, in my case.
- Search for “Proxy SwitchyOmega.”

- Click the extension.
- Click “Add to Chrome.”

- Click “Add extension” on the pop-up menu.

- Click “Skip guide” on the next pop-up.

- Choose “proxy” under “Profiles.”

- Fill the spaces with the information below:
- Protocol: HTTP
- Server: Paste the server address you copied in Step 3.

- Click the padlock icon.
- Enter the PrivateVPN proxy username you copied in Step 9 under “Username.”

- Enter your PrivateVPN account password in the appropriate box.
- Click “Save changes.”
- The padlock icon should now turn green. Then, click “Apply changes.”

- Click the browser extension icon to reveal Proxy SwitchyOmega.

- Click the extension itself.
- Click “proxy” to connect to the configured proxy address.

- Test for leaks to confirm you have the proxy server’s IP address. In my case, I’m now browsing via Berlin, the connected server.

How to Disconnect From PrivateVPN on Ubuntu?
How you disconnect from an active PrivateVPN server connection on Ubuntu depends on the setup method you prefer.
I’ve shared how to end the VPN connection for all PrivateVPN-Ubuntu setup methods below.
Network Manager Setup
Access the VPN settings under the Network Manager to toggle the VPN off.
In other words:
- Click the Ubuntu system status tray.

- Tap the connected server. That’s the AU Server, in my case.
- Toggle it off.
OpenVPN Client Setup
The PrivateVPN-Ubuntu OpenVPN CLI setup can be disconnected by entering the Ctrl + C command in the terminal.
Here are the steps:
- Launch the Ubuntu terminal.
- Hold the Ctrl and C keys together.
- The connection will be disabled by closing the TUN/TAP interface and exiting the process.

WireGuard Setup
The WireGuard setup requires that you always remember the WireGuard configuration file path to connect and disconnect.
Here’s what I mean:
- Go to the Ubuntu terminal.
- Run the command line below.
sudo wg-quick down [wireguard config directory]
- In my case, that’s [sudo wg-quick down /home/ochristopher/Downloads/wireguard.conf].

- Enter your password if prompted, then press Enter on your keyboard to continue.
- You’re now disconnected from the PrivateVPN WireGuard protocol on Ubuntu.

HTTP Proxy
Disconnecting from the PrivateVPN HTTP setup on Ubuntu is easy. Here’s how:
- Click the browser extension icon.

- Click “Proxy SwitchyOmega.”
- Click “[System Proxy].”

- You should be back to your regular connection and IP address.
How to Uninstall PrivateVPN on Ubuntu?
Since we didn’t install PrivateVPN as an app on Ubuntu, you don’t need to uninstall the VPN either. However, you can delete all PrivateVPN instances on Ubuntu by removing its configuration files and deleting the server configurations.
Here’s how:
- Go to your Downloads folder.
- Delete all PrivateVPN server configuration files you’ve downloaded.

- Click the Ubuntu systems manager icon.

- Click Wired Connected > Wired Settings.
- Click the settings cog icon in front of the PrivateVPN server configuration.

- Click “Remove VPN.”

- Repeat Steps 5 and 6 for the remaining PrivateVPN server configurations.
- You’ve successfully removed the VPN from your Ubuntu system.
Suppose you’ve configured the VPN on your browser via its extension.
In that case, you only need to delete the browser extension to remove the VPN.
The video guide below will help you.
Can You Use PrivateVPN Port Forwarding on Ubuntu?
You can use PrivateVPN port forwarding on Ubuntu, but only via the OpenVPN setup and with specific servers.
So, you should pick from PrivateVPN’s Ubuntu port forwarding servers (here) and follow the OpenVPN Network Manager or OpenVPN Client setup methods above to get it working.

Once set up, PrivateVPN support maintains that you can forward most ports requested from Ubuntu.
PrivateVPN-Ubuntu Troubleshooting Setup Guides
Following the setup methods above will usually lead to a hitch-free PrivateVPN connection on Ubuntu. Hence, you can start unblocking content, downloading torrents securely, and enjoying online anonymity on your Ubuntu in no time.
However, I noticed a small step that could become an issue if not resolved.
So, use these troubleshooting guides if you fall into any of the categories below.
Disable IPv6
Recommended for: PrivateVPN OpenVPN Setups
IPv6 often interferes with OpenVPN client and Network Manager setups.
If enabled, this network option may lead to IP/DNS leaks for you.
Hence, remember to disable it before installing OpenVPN configurations.
Here’s how:
- Launch your Terminal.
- Run the command below to bring up the network configuration files.
sudo nano /etc/sysctl.conf

- Scroll to the bottom of the page.
- Add the four lines below to the bottom of the page.
- net.ipv6.conf.all.disable_ipv6 = 1
- net.ipv6.conf.default.disable_ipv6 = 1
- net.ipv6.conf.lo.disable_ipv6 = 1
- net.ipv6.conf.tun0.disable_ipv6 = 1

- Save and exit the file.
- Restart your Ubuntu system.
Enable IPv6
Recommended for: PrivateVPN WireGuard Setup
The WireGuard setup will go through but may fail to connect with IPv6 disabled.
So, if you’re having issues connecting to PrivateVPN via its Ubuntu WireGuard setup, do these:
- Repeat Steps 1-3 from above.
- Delete the four lines of code you’ve added during the OpenVPN config in step 4 above.
- Save and exit the file.
- Restart your system.
You should now be able to connect via WireGuard.
FAQs
Is There a PrivateVPN Kill Switch on Ubuntu?
PrivateVPN offers a kill switch on Linux distros like Ubuntu.
Still, you can’t access a toggle-able option since the VPN lacks a graphical user interface. Instead, you’ll have to modify the VPN server’s code in your Ubuntu terminal after every connection to adapt the kill switch to your current server.
However, back up your iptables and firewall rulesets before configuring the PrivateVPN kill switch, as it may mess with those files.
Secure Your Ubuntu With PrivateVPN
Ubuntu is already a secure OS, but PrivateVPN’s 256-bit encryption on all servers provides security against online snoops and network admins.
So, you can connect to public Wi-Fi networks without worrying about network admins seeing your internet activities.
On top of that, PrivateVPN gives you access to geo-restricted Netflix, YouTube TV, Prime Video, Hulu, Peacock TV, BBC iPlayer, and other content on your Ubuntu.
Why not grab this one-time PrivateVPN deal before it expires and follow one of the setup guides above to use this robust Ubuntu VPN provider?