openvpn-conf.sh 650 Bytes
Newer Older
mehdi's avatar
mehdi committed
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
#!/bin/bash

echo "# Server TCP/${VPN_TCP_PORT:?}
mode server
proto tcp
port ${VPN_TCP_PORT:?}
dev tun
dev-node /app/code/net-tun
# Keys and certificats
ca /app/data/keys/ca.crt
cert /app/data/keys/cloudron.crt
key /app/data/keys/cloudron.key
dh /app/data/keys/dh2048.pem
tls-auth /app/data/keys/ta.key 0
cipher AES-256-CBC
# Network
server 10.8.0.0 255.255.255.0
push \"redirect-gateway def1 bypass-dhcp\"
push \"dhcp-option DNS 8.8.4.4\"
push \"dhcp-option DNS 8.8.8.8\"
client-to-client
keepalive 10 120
# Security
user nobody
group nogroup
persist-key
persist-tun
# Log
verb 3
mute 20
status /run/openvpn-status.log
log-append /run/openvpn.log
"