Commit graph

5 commits

Author SHA1 Message Date
Aaron Goodman
c4686691aa openfortivpn: fix shellcheck warnings
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2020-09-10 17:56:10 -04:00
Aaron Goodman
7d170b8f64 openfortivpn: tabify shell scripts
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2020-09-10 15:53:33 -04:00
Aaron Goodman
991147ff43 openfortivpn: improve logging
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2020-07-30 20:47:34 -04:00
Aaron Goodman
2f9cfb036f openfortivpn: block restart after authentication failure
Block restart of the interface if the openfortivpn fails to authenticate.
Without this check, with a bad password, netifd will continually
hit the VPN endpoint with connection attempts

Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
2020-07-28 23:06:09 -04:00
Aaron Goodman
9b0fce23d1 openfortivpn: Use netifd for script rather than init script
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>
2020-06-04 16:51:30 -04:00