OpenConnect Juniper VPN Not Working in Ubuntu 18.04

7,375

Solution 1

I performed a:

sudo apt install network-manager-openconnect-gnome

Then I setup the VPN details via the GUI. When I connect now via the GUI, it is working and there is communication.

I still need to investigate what is happening differently, but this might help in the meantime.

Solution 2

@Fabby Thank you for the response. I also made some progress the other day. I did some reading and ended up creating a tunnel manually:

sudo ip tuntap add vpn0 mode tun user $USERNAME

I then had to modify my command to use the new tunnel that was manually created:

exec /usr/bin/sudo /usr/sbin/openconnect --juniper --servercert $CERT --user=$USERNAME $HOST -i vpn0

This generally worked, but I didn't get the DNS servers, if I add them manually, then everything works.

I suspect that some changes with the latest kernel are preventing the tunnel from being created on the fly and that DNS is not being set when you tell it to use a pre-made tunnel.

I will play with the Gnome network manager as you suggest and play around with command line more as well. Thanks!

Share:
7,375

Related videos on Youtube

Neal Gamradt
Author by

Neal Gamradt

Updated on September 18, 2022

Comments

  • Neal Gamradt
    Neal Gamradt over 1 year

    I have been using openconnect for a long time now with our corporate VPN. I upgraded my personal laptop to Ubuntu 18.04 and I can no longer receive network traffic once connect.

    I use the following command to connect:

    /usr/bin/sudo /usr/sbin/openconnect --juniper --servercert $CERT --user=$USERNAME $HOST
    

    I have to use the --servercert flag because of how the certs were installed on the VPN servers.

    Anyway, this has been working flawlessly for the last few versions of Ubuntu.

    With 18.04, the /etc/resolve.conf file is getting modified as expected, openconnect itself reports no issues, but once I am connected, I receive no traffic.

    I have been doing some reading that the kernel with 18.04 may require some changes to the /etc/sysctl.conf file.

    Is there anyone who can help figure out why I no longer receive traffic once connected the VPN via openconnect?

    I assume since it doesn't appear to be DNS, that this is a problem with the tunnel.

    I am going to compare to my 17.10 machine to see if there is something obvious which is different.

    Any help would be greatly appreciated!

  • Neal Gamradt
    Neal Gamradt about 6 years
    Thank you for the response. I also made some progress the other day. I did some reading and ended up creating a tunnel manually:
  • Neal Gamradt
    Neal Gamradt almost 6 years
    @fabby Thank you for this tip, the last time I tried to use the GUI, the Juniper option for OpenConnect wasn't available in the GUI, you had to use the command line. I have used the GUI and everything appears to be working. DNS is working even though the nameservers never appear in /etc/resolv.cong. Not sure where to find the real nameservers in 18.04, but for now, I am able to use the VPN for my needs. Thanks for the tip, greatly appreciated!
  • Fabby
    Fabby almost 6 years
    @NealGamradt I just edited the answer, OrgJ answered. If you like it and it helped you, please consider upvoting