[SOLVED] VPN connection (openvpn to VPN Unlimited) disconnects immediately
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2011
    Posts
    12

    VPN connection (openvpn to VPN Unlimited) disconnects immediately

    I took out a week's subscription to VPN Unlimited to try it out. Installing it on my iPad under macOs went without any problems and works fine. However I am struggling to get it to work on the PC.

    My system is Fedora 25 x86-64.

    I followed the directions from the site: selected the protocol (openvpn), the location and generated a config file to download. This is what it looks like:

    <<<<<<<<<<<<<<<<

    client
    dev tun
    reneg-sec 0
    persist-tun
    persist-key
    ping 5
    ping-exit 30
    nobind
    comp-lzo adaptive
    remote-random
    ns-cert-type server
    route-metric 1
    <ca>
    -----BEGIN CERTIFICATE-----
    (redacted)
    -----END CERTIFICATE-----
    </ca>
    <cert>

    -----BEGIN CERTIFICATE-----
    (redacted)
    -----END CERTIFICATE-----
    </cert>
    <key>
    -----BEGIN PRIVATE KEY-----
    (redacted)
    -----END PRIVATE KEY-----

    </key>
    remote au-syd.vpnunlimitedapp.com
    proto udp

    >>>>>>>>>>>>>>>>>>>

    Then I opened Network Connections, selected "Import a saved VPN configuration", and saved the connection.

    The VPN now appears in the network Connections list, but if I try to switch it on I get a popup after less than a second which says
    "The VPN connection ....... disconnected because the VPN service stopped."

    For what it's worth, I tried setting up a PTTP connection instead. The outcome is exactly the same, except that the disconnection notification takes longer to appear (a few seconds).

    Attached is an extract from the journal; I have tried to only include what appears even remotely likely to be relevant.

    There are a couple of suggested fixes. I tried both of them, but no success. i do not understand them. What does this
    <<<<<<<
    If you want to fix the label.
    /home/bobh/.cert/nm-openvpn/BD29BA90-AC3C-44FE-BFA4-9CE8EAB69E0A_au-syd_openvpn-key.pem default label should be home_cert_t.
    Then you can run restorecon. The access attempt may have been stopped due to insufficient permissions to access a parent directory in which case try to change the following command accordingly.
    >>>>>>>>>>
    mean? what is the "label" it is referring to?

    Any suggestions appreciated.
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2010
    Posts
    7,333

    Re: VPN connection (openvpn to VPN Unlimited) disconnects immediately

    It is referring to an SELinux context labeling. You could try setenforce 0 to temporarily set SELinux to permissive and see if it is the problem.

    I don't use NetworkManager, so not sure how it works with OpenVPN. I just use sudo openvpn ./<config_file> which works for me. The ./ means current directory, I run it from the directory containing the config file, but just using the path to the config file will also work.

    Again, not sure how NetworkManager handles permissions and all that, but a VPN creates a virtual interface, so, if doing it manually, requires root privilege. Do you definitely have the networkmanager openvpn plugin installed?

    I would think, that as long as you're connected to the Internet, you could try just running sudo openvpn <config-file> and seeing if you have better luck with that. The terminal may even give you some useful error messages.

  3. #3
    Join Date
    Apr 2014
    Location
    Brooklyn
    Posts
    58

    Re: VPN connection (openvpn to VPN Unlimited) disconnects immediately

    try
    Code:
    chcon -t home_cert_t /home/bobh/.cert/nm-openvpn/*
    That is, if you certs and keys are located in /home/bobh/.cert/nm-openvpn/
    You can look at selinux permissions by
    Code:
    ls -lZ /home/bobh/.cert/nm-openvpn/

  4. #4
    Join Date
    May 2011
    Posts
    12

    Re: VPN connection (openvpn to VPN Unlimited) disconnects immediately

    Thanks people.

    Running openvpn from the command line did not work either. However running chcon as suggested above solved the problem!

    The selinux permissions was obviously the issue. Problem seemed t have nothing to do with Network Manager.

    Thanks again.

Similar Threads

  1. [SOLVED]
    Ethernet connection disconnects randomly
    By davidk in forum Servers & Networking
    Replies: 1
    Last Post: 14th August 2016, 10:26 AM
  2. [SOLVED]
    Disconnects with mobile broadband connection
    By renice in forum Servers & Networking
    Replies: 7
    Last Post: 27th July 2014, 08:51 PM
  3. OpenVPN client disconnects me from LAN
    By flaim in forum Servers & Networking
    Replies: 2
    Last Post: 16th September 2009, 08:02 PM
  4. Wireless Disconnects in Favor of Better Connection
    By Cody in forum Servers & Networking
    Replies: 0
    Last Post: 30th March 2007, 01:57 AM
  5. Internet connection disconnects briefly with FC 5
    By Frogdude in forum Servers & Networking
    Replies: 3
    Last Post: 30th July 2006, 09:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •