Repository navigation
Expand file tree
/
Copy pathvpn.conf.example
More file actions
66 lines (52 loc) · 3.38 KB
/
Copy pathvpn.conf.example
File metadata and controls
66 lines (52 loc) · 3.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# fortivpn-auto configuration (shell-sourced — keep it valid bash)
#
# Copy to ./vpn.conf and edit, OR start from a preset:
# cp presets/ucalgary.conf vpn.conf
# ./install.sh
#
# vpn.conf is gitignored so your gateway/SSID set never gets committed.
# ── Required ────────────────────────────────────────────────────────────────
# FortiGate SSL-VPN gateway (no scheme, no port here).
GATEWAY_HOST="vpn.example.edu"
# SSL-VPN port — almost always 10443 for FortiGate.
GATEWAY_PORT="10443"
# SSIDs on which the VPN should NOT connect (your home / on-campus secure net).
# Joining ANY other Wi-Fi triggers an auto-connect; returning to one of these
# tears the tunnel down. Bash array — quote each, space-separated.
TRUSTED_SSIDS=("eduroam" "my-home-wifi")
# ── Optional ────────────────────────────────────────────────────────────────
# Pin the gateway's SSL cert (SHA-256, lowercase, no colons). Leave EMPTY to
# fetch + pin the live cert at install time (recommended — trust-on-first-use).
# install.sh / refresh-cert.sh manage this; openfortivpn validates against it
# instead of the system trust store. We never fall back to --insecure-ssl.
TRUSTED_CERT=""
# Override the openfortivpn binary path. Leave EMPTY to auto-detect via
# `command -v openfortivpn` (handles Homebrew arm64 /opt/homebrew, Intel
# /usr/local, and MacPorts /opt/local).
OPENFORTIVPN_BIN=""
# Some FortiGates require a SAML realm segment. Leave EMPTY unless your IT
# tells you the login path is /remote/saml/start?realm=<name>.
REALM=""
# State-machine tuning (seconds / count). Defaults are sane; uncomment to change.
# START_DELAY=3 # wait after SSID change before acting (DHCP settle)
# RETRY_DELAY=30 # wait between connect retries
# MAX_RETRIES=3 # give up after this many, until next network change
# ── Staying connected ────────────────────────────────────────────────────────
# Auto-reconnect: openfortivpn reconnects on drops (e.g. Wi-Fi changes), reusing
# the SAML session cookie — no re-login — until the gateway expires it. This is
# the SECONDS BETWEEN reconnect attempts, NOT a session lifetime; keep it short.
# 0 disables persistence (one-shot connect, the old behaviour).
PERSISTENT_RECONNECT=25
# Keepalive against an idle timeout: every N seconds, send a ping through the
# tunnel so the gateway doesn't consider the session idle. 0 disables it. Only
# helps with an *idle* timeout — a hard session cap still forces a re-login
# (that's a gateway policy you can't change from the client).
KEEPALIVE_INTERVAL=0
# Host to ping for keepalive. EMPTY = auto-detect the tunnel's gateway peer
# (works generically). Set an internal-only host if your gateway ignores that.
KEEPALIVE_HOST=""
# How long the tunnel may stay down (in ACTIVE time — the clock pauses while your
# Mac sleeps) before we force a fresh SAML login. Keep it comfortably LARGER than
# PERSISTENT_RECONNECT so a transient drop (sleep, Wi-Fi handoff) recovers on its
# own with the still-valid cookie instead of triggering an unnecessary re-login.
RECONNECT_GRACE=180