-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathswanctl.conf.j2
41 lines (38 loc) · 823 Bytes
/
swanctl.conf.j2
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
connections {
ikev2-eap {
version = 2
pools = primary-pool-ipv4
dpd_delay = 30s
send_cert = always
local-1 {
auth = pubkey
certs = fullchain.pem
id = {{ domain }}
}
remote-1 {
auth = eap-mschapv2
# go ask the client for its eap identity.
eap_id = %any
}
children {
ikev2-eap {
local_ts = {{ vpn_local_ts }}
}
}
}
}
pools {
primary-pool-ipv4 {
addrs = 172.16.252.0/24
dns = 8.8.8.8, 8.8.4.4
split_exclude = 172.16.0.0/12
}
}
secrets {
{% for user in vpn_users %}
eap-{{ user.username }} {
id = {{ user.username }}
secret = "{{ user.password }}"
}
{% endfor %}
}