Signed-off-by: Nis Wechselberg <enbewe@enbewe.de>
This commit is contained in:
parent
3a99c37a82
commit
6e8d01203a
13 changed files with 249 additions and 0 deletions
1
roles/server/templates/ca.crt.j2
Normal file
1
roles/server/templates/ca.crt.j2
Normal file
|
@ -0,0 +1 @@
|
|||
{{ openvpn_server_ca_content }}
|
1
roles/server/templates/ccd.j2
Normal file
1
roles/server/templates/ccd.j2
Normal file
|
@ -0,0 +1 @@
|
|||
{{ item.value }}
|
1
roles/server/templates/cert.crt.j2
Normal file
1
roles/server/templates/cert.crt.j2
Normal file
|
@ -0,0 +1 @@
|
|||
{{ openvpn_server_cert_content }}
|
1
roles/server/templates/cert.key.j2
Normal file
1
roles/server/templates/cert.key.j2
Normal file
|
@ -0,0 +1 @@
|
|||
{{ openvpn_server_key_content }}
|
1
roles/server/templates/cert.pwd.j2
Normal file
1
roles/server/templates/cert.pwd.j2
Normal file
|
@ -0,0 +1 @@
|
|||
{{ openvpn_server_askpass_content }}
|
1
roles/server/templates/crl.pem.j2
Normal file
1
roles/server/templates/crl.pem.j2
Normal file
|
@ -0,0 +1 @@
|
|||
{{ openvpn_server_crl_content }}
|
1
roles/server/templates/dh2048.pem.j2
Normal file
1
roles/server/templates/dh2048.pem.j2
Normal file
|
@ -0,0 +1 @@
|
|||
{{ openvpn_server_dh_content }}
|
111
roles/server/templates/openvpn_server.conf.j2
Normal file
111
roles/server/templates/openvpn_server.conf.j2
Normal file
|
@ -0,0 +1,111 @@
|
|||
###### ######## ## ## ######## ######## ### ##
|
||||
## ## ## ### ## ## ## ## ## ## ##
|
||||
## ## #### ## ## ## ## ## ## ##
|
||||
## #### ###### ## ## ## ###### ######## ## ## ##
|
||||
## ## ## ## #### ## ## ## ######### ##
|
||||
## ## ## ## ### ## ## ## ## ## ##
|
||||
###### ######## ## ## ######## ## ## ## ## ########
|
||||
|
||||
# Reduce the OpenVPN daemon's privileges after initialization
|
||||
user nobody
|
||||
group nogroup
|
||||
|
||||
# TCP or UDP server?
|
||||
proto udp
|
||||
proto udp6
|
||||
|
||||
# Subnet mode instead of p2p
|
||||
topology subnet
|
||||
|
||||
# Which TCP/UDP port should OpenVPN listen on?
|
||||
port {{ openvpn_server_port }}
|
||||
|
||||
# "dev tun" will create a routed IP tunnel, "dev tap" will create an
|
||||
# ethernet tunnel
|
||||
dev tun
|
||||
|
||||
# Enable compression on the VPN link
|
||||
comp-lzo
|
||||
|
||||
# Maintain a record of client virtual IP address associations in this file.
|
||||
ifconfig-pool-persist {{ openvpn_server_directory }}/ipp.txt
|
||||
|
||||
# Output a short status file showing current connections, truncated
|
||||
# and rewritten every minute.
|
||||
status {{ openvpn_server_directory }}/openvpn-status.log
|
||||
|
||||
# Configure server mode and supply a VPN subnet for OpenVPN to draw client
|
||||
# addresses from. The server will take subnet ip .1 for itself, the rest will
|
||||
# be made available to clients.
|
||||
server {{ openvpn_server_ipv4_pool }} {{ openvpn_server_ipv4_subnet }}
|
||||
server-ipv6 {{ openvpn_server_ipv6 }}
|
||||
|
||||
{% for route in openvpn_server_routes %}
|
||||
route {{route.network }} {{ route.subnet }}
|
||||
{% endfor %}
|
||||
|
||||
# Uncomment this directive to allow different clients to be able
|
||||
# to "see" each other.
|
||||
client-to-client
|
||||
|
||||
# Ping every 10 seconds, assume that remote peer is down if no ping received
|
||||
# during a 120 second time period.
|
||||
keepalive 10 120
|
||||
|
||||
# The persist options will try to avoid accessing certain resources on restart
|
||||
# that may no longer be accessible because of the privilege downgrade.
|
||||
persist-key
|
||||
persist-tun
|
||||
|
||||
# Allow client specific configurations
|
||||
client-config-dir {{ openvpn_server_directory }}/ccd
|
||||
|
||||
# Set the appropriate level of log
|
||||
# file verbosity.
|
||||
#
|
||||
# 0 is silent, except for fatal errors
|
||||
# 4 is reasonable for general usage
|
||||
# 5 and 6 can help to debug connection problems
|
||||
# 9 is extremely verbose
|
||||
verb 4
|
||||
|
||||
|
||||
###### ######## ###### ## ## ######## #### ######## ## ##
|
||||
## ## ## ## ## ## ## ## ## ## ## ## ##
|
||||
## ## ## ## ## ## ## ## ## ####
|
||||
###### ###### ## ## ## ######## ## ## ##
|
||||
## ## ## ## ## ## ## ## ## ##
|
||||
## ## ## ## ## ## ## ## ## ## ## ##
|
||||
###### ######## ###### ####### ## ## #### ## ##
|
||||
# SSL/TLS root certificate (ca), certificate (cert), and private key (key)
|
||||
ca {{ openvpn_server_ca }}
|
||||
cert {{ openvpn_server_cert }}
|
||||
key {{ openvpn_server_key }}
|
||||
|
||||
# Password for certificate provided in separate file
|
||||
askpass {{ openvpn_server_passfile }}
|
||||
auth-nocache
|
||||
|
||||
# Verify against revoked certificates
|
||||
crl-verify {{ openvpn_server_crl }}
|
||||
|
||||
# Diffie hellman parameters
|
||||
dh {{ openvpn_server_dhfile }}
|
||||
|
||||
# For extra security beyond that provided by SSL/TLS, create an "HMAC firewall"
|
||||
# to help block DoS attacks and UDP port flooding.
|
||||
# The server and each client must have a copy of this key.
|
||||
# The second parameter should be '0' on the server and '1' on the clients.
|
||||
tls-auth {{ openvpn_server_tlsauth }} 0
|
||||
|
||||
# Select a cryptographic cipher
|
||||
cipher AES-256-CBC
|
||||
|
||||
# Improve message authentication
|
||||
auth SHA256
|
||||
|
||||
# Enforce TLSv1.2
|
||||
tls-version-min 1.2
|
||||
|
||||
# Limit the available cipersuites to reasonably safe choices
|
||||
tls-cipher TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256:TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256:TLS-ECDHE-RSA-WITH-AES-256-GCM-SHA384:TLS-DHE-RSA-WITH-AES-256-CBC-SHA256
|
1
roles/server/templates/tls-auth.key.j2
Normal file
1
roles/server/templates/tls-auth.key.j2
Normal file
|
@ -0,0 +1 @@
|
|||
{{ openvpn_server_tlsauth_content }}
|
Loading…
Add table
Add a link
Reference in a new issue