Bug 1340495

Summary: NetworkManager GUI for openconnect VPN does not provide option for "--juniper"
Product: [Fedora] Fedora Reporter: contact
Component: NetworkManager-openconnectAssignee: David Woodhouse <dwmw2>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: dcbw, dwmw2, psimerda, tadej.j, thaller
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: NetworkManager-openconnect-1.2.4-1.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-09 22:25:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description contact 2016-05-27 14:22:53 UTC
Description of problem:

Using Command line openconnect I am able to connect to my work VPN as:
sudo openconnect --juniper vpn.xxxx.xxx

However the GUI does not seem to have a provision for passing the --juniper switch. Would it be possible to add this ability to the GUI so those of us needing the juniper switch do not need to keep a terminal going in the background for VPN?


Version-Release number of selected component (if applicable):
Fedora 23 & 24

$ openconnect --version
OpenConnect version v7.06-4.fc24
Using GnuTLS. Features present: TPM, PKCS#11, RSA software token, HOTP software token, TOTP software token, Yubikey OATH, System keys, DTLS

# dnf info NetworkManager  
Last metadata expiration check: 1:00:04 ago on Fri May 27 07:17:20 2016.
Installed Packages
Name        : NetworkManager
Arch        : x86_64
Epoch       : 1
Version     : 1.2.2
Release     : 1.fc24
Size        : 10 M
Repo        : @System
From repo   : updates-testing

Comment 1 Tadej Janež 2016-09-23 08:47:33 UTC
Would it be possible to push the changes to the f24 branch and make an update?

Comment 2 David Woodhouse 2016-09-23 09:43:55 UTC
Does this not already work? Create a NM VPN of type 'anyconnect' and then go into it and change the protocol. 

You don't get the nice pretty top-level choice of Juniper without some more intrusive changes to NM which aren't easy to backport. But you can do it this way, I think.

Comment 3 Tadej Janež 2016-09-23 10:06:08 UTC
No, it doesn't work that way.

And even manually adding it via:

nmcli con add type vpn con-name "Juniper" ifname "*" vpn-type openconnect -- vpn.data "gateway=<gateway-address>,protocol=nc"

doesn't work.

Here is an example log output for a failed connection:
POST https://vpn.sund.ku.dk/linux
Attempting to connect to server 192.38.117.10:443
Connected to 192.38.117.10:443
SSL negotiation with vpn.sund.ku.dk
Connected to HTTPS on vpn.sund.ku.dk
Got HTTP response: HTTP/1.1 302 Found
Location: https://vpn.sund.ku.dk/dana-na/auth/welcome.cgi
Content-Type: text/html; charset=utf-8
Set-Cookie: DSLaunchURL=2F6C696E7578; path=/; Secure
Connection: close
Content-Length: 0
HTTP body length:  (0)
GET https://vpn.sund.ku.dk/linux
Attempting to connect to server 192.38.117.10:443
Connected to 192.38.117.10:443
SSL negotiation with vpn.sund.ku.dk
Connected to HTTPS on vpn.sund.ku.dk
Got HTTP response: HTTP/1.1 302 Found
Location: https://vpn.sund.ku.dk/dana-na/auth/welcome.cgi
Content-Type: text/html; charset=utf-8
Set-Cookie: DSLaunchURL=2F6C696E7578; path=/; Secure
Connection: close
Content-Length: 0
HTTP body length:  (0)
GET https://vpn.sund.ku.dk/dana-na/auth/welcome.cgi
SSL negotiation with vpn.sund.ku.dk
Connected to HTTPS on vpn.sund.ku.dk
Got HTTP response: HTTP/1.1 302 Found
Location: https://vpn.sund.ku.dk/
Content-Type: text/html; charset=utf-8
Connection: close
Content-Length: 0
HTTP body length:  (0)
GET https://vpn.sund.ku.dk/
SSL negotiation with vpn.sund.ku.dk
Connected to HTTPS on vpn.sund.ku.dk
Got HTTP response: HTTP/1.1 302 Found
Location: https://vpn.sund.ku.dk/dana-na/auth/url_0/welcome.cgi
Content-Type: text/html; charset=utf-8
Set-Cookie: DSSIGNIN=url_0; path=/dana-na/; expires=Thu, 31-Dec-2037 00:00:00 GMT; secure
Set-Cookie: DSIVS=; path=/; expires=Thu, 01 Jan 1970 22:00:00 GMT; secure
Set-Cookie: DSSignInURL=/; path=/; secure
Connection: close
Content-Length: 0
HTTP body length:  (0)

I've rebuilt NetworkManager-openconnect from f25/rawhide (https://pkgs.fedoraproject.org/cgit/rpms/NetworkManager-openconnect.git/commit/?id=452f8438f66b26e88c1eaaedf87f258ed237c225) locally and manually added the connection, i.e. there is no way to change the protocol to "nc" in the GUI.

Then things work and I get the "nice" realm, username, password GUI dialog.

Comment 4 David Woodhouse 2016-09-23 10:31:48 UTC
Hm yes, I added that later didn't I?

I've updated the package in rawhide, and it should allow you to select the protocol via the GUI. Please could you test that; if it's working nicely for you then I'll look at pushing it to F2[45].

Thanks.

Comment 5 Tadej Janež 2016-09-23 11:45:48 UTC
(In reply to David Woodhouse from comment #4)
> 
> I've updated the package in rawhide, and it should allow you to select the
> protocol via the GUI. Please could you test that; if it's working nicely for
> you then I'll look at pushing it to F2[45].

Great, thanks!

Will the protocol selection in GUI work with NetworkManager that's in Fedora 24 (NetworkManager-1.2.4-2.fc24.x86_64)?

I'll rebuild and test the package ASAP.

Comment 6 David Woodhouse 2016-09-23 11:57:16 UTC
Yes, the updated NM-openconnect package should work with the version of NetworkManager that's in F24.

Comment 7 Tadej Janež 2016-09-23 12:21:03 UTC
(In reply to David Woodhouse from comment #6)
> Yes, the updated NM-openconnect package should work with the version of
> NetworkManager that's in F24.

Great.

I've rebuild and tested:
NetworkManager-openconnect-1.2.3-0.20160923gitac5cdf.fc24.x86_64
NetworkManager-openconnect-gnome-1.2.3-0.20160923gitac5cdf.fc24.x86_64

and it works (the GUI protocol chooser also works as advertised).

Comment 8 Fedora Update System 2016-12-05 12:02:26 UTC
NetworkManager-openconnect-1.2.4-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-4b0e78e336

Comment 9 Fedora Update System 2016-12-06 03:25:12 UTC
NetworkManager-openconnect-1.2.4-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-4b0e78e336

Comment 10 Fedora Update System 2016-12-09 22:25:52 UTC
NetworkManager-openconnect-1.2.4-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.