Skip to content

Instantly share code, notes, and snippets.

@Tristor
Last active September 14, 2018 06:16
Show Gist options
  • Save Tristor/b939b830c6426926696a49d4789031e8 to your computer and use it in GitHub Desktop.
Save Tristor/b939b830c6426926696a49d4789031e8 to your computer and use it in GitHub Desktop.
OpenVPN server.conf
# Basic Connection Config
dev tun
proto udp
port 1194
keepalive 10 120
max-clients 5
# Certs
ca ca.crt
cert server.crt
key server.key
dh dh2048.pem
tls-auth ta.key 0
# Ciphers and Hardening
reneg-sec 0
remote-cert-tls client
crl-verify crl.pem
tls-version-min 1.2
cipher AES-256-CBC
auth SHA512
tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384:TLS-DHE-RSA-WITH-AES-256-CBC-SHA256:TLS-DHE-RSA-WITH-AES-128-GCM-SHA256:TLS-DHE-RSA-WITH-AES-128-CBC-SHA256
# Drop Privs
user nobody
group nobody
# IP pool
server 172.16.100.0 255.255.255.0
topology subnet
ifconfig-pool-persist ipp.txt
client-config-dir ccd
# Misc
persist-key
persist-tun
comp-lzo
# DHCP Push options force all traffic through VPN and sets DNS servers
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 4.2.2.2"
# Logging
log-append /var/log/openvpn.log
verb 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment