1 The openconnect client expects to be configured using the uci interface.
3 To setup a VPN connection, add the following to /etc/config/network:
5 config interface 'MYVPN'
6 option proto 'openconnect'
8 option server 'vpn.example.com'
10 option username 'test'
11 option password 'secret'
12 option serverhash 'AE7FF6A0426F0A0CD0A02EB9EC3C5066FAEB0B25'
13 option defaultroute '0'
14 option authgroup 'DEFAULT'
15 # usergroup option, if required by some servers
16 # option usergroup 'USERGROUP'
18 # For second factor auth:
20 # when a fixed 2FA password can be used
21 #option password2 'my-fixed-2fa-password'
23 # RSA tokens, must be built with stoken support
24 #option token_mode 'rsa'
25 #option token_secret 'secret'
28 #option token_mode 'hotp'
29 #option token_secret '00'
32 #option token_mode 'script'
33 #option token_script '/lib/custom/getocpass.sh'
35 # For non-anyconnect vpn protocols
36 # Cisco AnyConnect (default)
37 #option vpn_protocol 'anyconnect'
38 # Juniper Network Connect
39 #option vpn_protocol 'nc'
40 # Palo Alto Networks GlobalProtect
41 #option vpn_protocol 'gp'
42 # Pulse Connect Secure
43 #option vpn_protocol 'pulse'
45 # Authentication form responses
46 #list form_entry FORM:OPT=VAL
48 The additional files are also used:
49 /etc/openconnect/user-cert-vpn-MYVPN.pem: The user certificate
50 /etc/openconnect/user-key-vpn-MYVPN.pem: The user private key
51 /etc/openconnect/ca-vpn-MYVPN.pem: The CA certificate (instead of serverhash)
53 After these are setup you can initiate the VPN using "ifup MYVPN", and
54 deinitialize it using ifdown. You may also use the luci web interface
55 (Network -> Interfaces -> MYVPN Connect).
57 Note that you need to configure the firewall to allow communication between
58 the MYVPN interface and lan.
60 There is a luci plugin to allow configuring an openconnect interface from
61 the web environment; see the luci-proto-openconnect package.