By using the netifd for open fortivpn we are able to set up multiple VPN connections and manage them through the netifd toolset. This also adds support for binding an openfortivpn client to a given interface, in which case when that interface comes online, the vpn will be initiated via a hotplug script. This is a breaking commit and configurations will need to be migrated from openfortivpn.config into the /etc/config/networks. Example configuration via /etc/config/network: config interface 'ftvpn' option proto 'openfortivpn' option server 'example.com' option username 'USERNAME' option password 'PASSWORD' # optional arguments follow option local_ip '192.0.5.1' option port '443' option iface_name 'wan' option trusted_cert 'CERT_HASH' option set_dns '0' option pppd_use_peerdns '0' option metric '10' Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
13 lines
No EOL
246 B
Bash
Executable file
13 lines
No EOL
246 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# This script wraps openfortivpn in order to obtain the password
|
|
# file from cmd and to daemonize
|
|
|
|
# $1 password file
|
|
# $2... are passed to openconnect
|
|
|
|
test -z "$1" && exit 1
|
|
|
|
pwfile=$1
|
|
shift
|
|
exec /usr/sbin/openfortivpn "$@" < $pwfile |