feat(ansible): add VPN node configuration automation
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
NAS-Identifier={{ nas_identifier }}
|
||||
NAS-IP-Address={{ nas_ip_address }}
|
||||
|
||||
Service-Type=5
|
||||
Framed-Protocol=1
|
||||
NAS-Port-Type=5
|
||||
|
||||
OpenVPNConfig=/etc/openvpn/server/server.conf
|
||||
|
||||
subnet=255.255.255.0
|
||||
|
||||
useauthcontrolfile=true
|
||||
useclientconnectdeferfile=true
|
||||
overwriteccfiles=true
|
||||
|
||||
nonfatalaccounting=false
|
||||
|
||||
AddMessageAuthenticator=yes
|
||||
|
||||
log_level=5
|
||||
|
||||
server
|
||||
{
|
||||
name={{ radius_server }}
|
||||
authport={{ radius_auth_port }}
|
||||
acctport={{ radius_acct_port }}
|
||||
sharedsecret={{ radius_shared_secret }}
|
||||
|
||||
retry=3
|
||||
wait=10
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
port {{ openvpn_port }}
|
||||
proto {{ openvpn_proto }}
|
||||
|
||||
dev {{ openvpn_mode }}
|
||||
|
||||
client-to-client
|
||||
|
||||
persist-key
|
||||
persist-tun
|
||||
|
||||
keepalive 10 120
|
||||
|
||||
server-bridge
|
||||
mode server
|
||||
|
||||
vlan-tagging
|
||||
|
||||
plugin /usr/lib/openvpn/radiusplugin.so /etc/openvpn/radiusplugin.cnf
|
||||
|
||||
verify-client-cert none
|
||||
username-as-common-name
|
||||
|
||||
client-config-dir {{ openvpn_ccd_dir }}
|
||||
|
||||
script-security 2
|
||||
client-connect /etc/openvpn/scripts/client-connect.sh
|
||||
|
||||
ca {{ openvpn_cert_dir }}/ca.crt
|
||||
cert {{ openvpn_cert_dir }}/server.crt
|
||||
key {{ openvpn_cert_dir }}/server.key
|
||||
|
||||
dh none
|
||||
ecdh-curve prime256v1
|
||||
|
||||
data-ciphers AES-256-GCM:AES-128-GCM
|
||||
data-ciphers-fallback AES-256-CBC
|
||||
|
||||
sndbuf 0
|
||||
rcvbuf 0
|
||||
|
||||
tun-mtu 1400
|
||||
|
||||
verb 3
|
||||
|
||||
status /var/log/openvpn-status.log
|
||||
Reference in New Issue
Block a user