How to setup OpenVPN on Fedora

openvpn logoVPNs (Virtual Private Networks) are nothing new, and if you find yourself in a scenario where need to create a tunnel to a secure network, OpenVPN is your go to software to get you there. OpenVPN is available for free for Windows, Linux, or Mac.

Installing OpenVPN on Fedora is pretty easy to do. You can either download OpenVPN directly, or install it using yum or dnf (Fedora 22 and up). Since we’re using Fedora 23, we’ll be using dnf for this example. OpenVPN may already be installed by default, but if it isn’t, you can just run the following the command:

sudo dnf install NetworkManager-openvpn NetworkManager-openvpn-gnome openvpn

For my purposes, I needed OpenVPN in order to create a secure tunnel to the network at my downtown office. My IT team provided me with the certs as well as the .opvn file. Instead of using the command line to configure OpenVPN, I found that the easiest way to set it up was to just use the Network Manager GUI which you can find under System Tools/Settings/Network.

I recommend copying your certs and .opvn file to /etc/openvpn. I initially had kept the certs in my home directory but this didn’t work since OpenVPN didn’t have the correct permissions to access them.

Once you’re ready, press the plus (+) to add a new network. Choose VPN and then import your .opvn file.

network settings fedora

If the import worked, you’ll see that the required fields will be populated: User Certificate, CA Certificate and Private Key. Then, include your username and password in the appropriate fields, and hit apply.

vpn credentials openvpn

Once you’re done, all you need to do to test the VPN is click “ON” and you’re done.


Was this helpful?

4 thoughts on “How to setup OpenVPN on Fedora

  1. Hey there, Thanks for the simple post! Nice writing.

    I have been trying this for a good few weeks but not getting any joy. I tried both with the GUI and the terminal and not working/ I keep getting the ‘Activation of network connection failed’ error.

    I am slightly new to Linux – fedora in particular. I started with in Jan 2016. And now looking to format (with all the playing around with configs etc) and install F24 now … hopefully that or a response here helps 🙂

    Thanks in advance, Yatish

  2. Wow, I missed the “import config” option when adding my VPN. Thanks man. Lesson learned, don’t try to set up VPNs at 5am

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.