masterthesis/openvpn-config/server.conf

121 lines
3.7 KiB
Plaintext
Raw Normal View History

2018-09-03 10:21:39 +02:00
# Listen on 1194 for both IPv4 and IPv6
port 1194
proto udp
proto udp6
2018-09-27 10:36:27 +02:00
# Since we have more than one ip address, this makes openvpn respond
# with the right sender address
2018-09-19 21:48:08 +02:00
multihome
2018-09-27 10:36:27 +02:00
# We're using the virtual network interface on layer 3
2018-09-03 10:21:39 +02:00
dev tun
2018-09-27 10:36:27 +02:00
# Certificates to use. Paths are relative to config file location.
2018-09-20 15:04:54 +02:00
ca inform/ca.crt
cert inform/aither.inform.hs-hannover.de.crt
key inform/aither.inform.hs-hannover.de.key
2018-09-19 14:09:30 +02:00
2018-09-27 10:36:27 +02:00
# Assume server role in tls handshake
2018-09-19 14:09:30 +02:00
tls-server
2018-09-27 10:36:27 +02:00
# Diffie-Hellman parameter file
2018-09-20 15:04:54 +02:00
dh inform/dh.pem
2018-09-03 10:21:39 +02:00
2018-09-27 10:36:27 +02:00
# Certificate revocation list location
# Make sure this file is always valid, otherwise OpenVPN refuses to (re)start!
2018-09-20 15:04:54 +02:00
crl-verify inform/crl.pem
2018-09-19 13:12:41 +02:00
2018-09-03 10:21:39 +02:00
# Make sure the client presents a certificate with "client role"
remote-cert-tls client
# Allow multiple connections using the same certificate?
2018-09-27 10:36:27 +02:00
# There is no reason to not allow this, so it is allowed.
2018-09-19 21:48:08 +02:00
duplicate-cn
2018-09-03 10:21:39 +02:00
2018-09-27 10:36:27 +02:00
# We're using subnet topology for IPv4 tunnel connectivity
2018-09-19 12:23:33 +02:00
topology subnet
2018-09-03 10:21:39 +02:00
2018-09-27 10:36:27 +02:00
# Use this IPv4 range for clients (/16, so we can cope with potential 500 clients)
2018-09-19 12:23:33 +02:00
server 10.2.0.0 255.255.0.0
2018-09-03 10:21:39 +02:00
# Use this IPv6 network for clients
server-ipv6 2001:638:614:1750::/64
2018-09-27 10:36:27 +02:00
# Make sure the client can still reach the OpenVPN server via its IPv4 default gateway
# This is needed because the IPv4 route for DMZ is pushed below,
# which overlaps the OpenVPN server IPv4 address.
2018-09-03 10:21:39 +02:00
push "route remote_host 255.255.255.255 net_gateway"
2018-09-19 12:23:33 +02:00
# Push routes for local IPv4 networks
2018-09-27 10:36:27 +02:00
#
2018-09-21 19:59:27 +02:00
# DMZ
push "route 141.71.38.0 255.255.255.0 vpn_gateway"
# Inform
2018-09-19 12:23:33 +02:00
push "route 141.71.30.0 255.255.254.0 vpn_gateway"
2018-09-21 19:59:27 +02:00
# Edu
2018-09-19 12:23:33 +02:00
push "route 192.168.99.0 255.255.255.0 vpn_gateway"
2018-09-21 19:59:27 +02:00
# NAO
push "route 192.168.90.0 255.255.255.0 vpn_gateway"
# iDrac
push "route 192.168.70.0 255.255.255.0 vpn_gateway"
# Cluster
push "route 10.0.20.0 255.255.255.0 vpn_gateway"
# educloud
push "route 10.0.30.0 255.255.255.0 vpn_gateway"
# experimental ipv6 network
push "route 10.0.40.0 255.255.255.0 vpn_gateway"
# server network from H-IT for KMS
push "route 141.71.2.0 255.255.255.0 vpn_gateway"
2018-09-03 10:21:39 +02:00
# Push routes for local IPv6 networks
2018-09-19 21:48:08 +02:00
# (The vpn_gateway placeholder does not work here.)
2018-09-27 10:36:27 +02:00
# Note: IPv6 routes that overlap the IPv6 address of the OpenVPN server will
# automatically trigger creating a direct route to the OpenVPN server on the client.
#
2018-09-21 19:59:27 +02:00
# DMZ
push "route-ipv6 2001:638:614:1780::/64 2001:638:614:1750::1"
# Inform
push "route-ipv6 2001:638:614:1720::/64 2001:638:614:1750::1"
2018-09-21 19:59:27 +02:00
# Edu
push "route-ipv6 2001:638:614:1721::/64 2001:638:614:1750::1"
2018-09-21 19:59:27 +02:00
# NAO
push "route-ipv6 2001:638:614:1722::/64 2001:638:614:1750::1"
# Cluster
push "route-ipv6 2001:638:614:1743::/64 2001:638:614:1750::1"
2018-09-03 10:21:39 +02:00
2018-09-27 10:36:27 +02:00
# Global settings regarding TLS, chiphers and hash algorithms
# These settings MUST BE CONGRUENT with client configurations.
# If you change these, make sure you update the provided client config file
# and you NOTIFY ALL USERS to update their configuration!
2018-09-19 14:09:30 +02:00
cipher AES-256-GCM
auth SHA256
tls-cipher TLS-ECDHE-RSA-WITH-AES-256-GCM-SHA384
tls-version-min "1.2"
2018-09-27 10:36:27 +02:00
# Disable cipher negotiation on server side
ncp-disable
# Send ping message every ten seconds, expect session loss after 60 seconds of no response
2018-09-03 10:21:39 +02:00
keepalive 10 60
2018-09-27 10:36:27 +02:00
# Notify clients when the server restarts or shuts down.
# Default behaviour: Tell clients to try to connect to the same server again.
explicit-exit-notify 1
# Enable these if you plan to enable running on reduced privileges
# These options allow to keep the private key and the virtual network device handle in memory
2018-09-03 10:21:39 +02:00
persist-key
persist-tun
2018-09-27 10:36:27 +02:00
# Reduce privileges after launch (uncomment and adapt on unix/linux system)
2018-09-03 10:21:39 +02:00
user nobody
2018-09-07 19:21:17 +02:00
group nogroup
2018-09-03 10:21:39 +02:00
# Logging settings
verb 3
mute 5
2018-09-27 10:36:27 +02:00
# Print a list of active sessions into this file
# This might be helpful if you plan big maintenance
2018-09-27 10:58:53 +02:00
status inform/status.log