|
|
@ -2,9 +2,9 @@ |
|
|
|
|
|
|
|
|
|
|
|
# TCP or UDP, port 443, tunneling |
|
|
|
# TCP or UDP, port 443, tunneling |
|
|
|
mode server |
|
|
|
mode server |
|
|
|
proto tcp |
|
|
|
proto VPN_PROTO |
|
|
|
port 443 |
|
|
|
port VPN_PORT |
|
|
|
dev tun |
|
|
|
dev VPN_INIF |
|
|
|
|
|
|
|
|
|
|
|
## KEY, CERTS AND NETWORK CONFIGURATION ## |
|
|
|
## KEY, CERTS AND NETWORK CONFIGURATION ## |
|
|
|
# Identity |
|
|
|
# Identity |
|
|
@ -23,7 +23,7 @@ cipher AES-256-CBC |
|
|
|
|
|
|
|
|
|
|
|
# Network |
|
|
|
# Network |
|
|
|
# Subnetwork, the server will be the 10.8.0.1 and clients will take the other ips |
|
|
|
# Subnetwork, the server will be the 10.8.0.1 and clients will take the other ips |
|
|
|
server 10.8.0.0 255.255.255.0 |
|
|
|
server VPN_SERVER |
|
|
|
|
|
|
|
|
|
|
|
# Redirect all IP network traffic originating on client machines to pass through the OpenVPN server |
|
|
|
# Redirect all IP network traffic originating on client machines to pass through the OpenVPN server |
|
|
|
push "redirect-gateway def1" |
|
|
|
push "redirect-gateway def1" |
|
|
@ -81,10 +81,11 @@ script-security 3 |
|
|
|
username-as-common-name |
|
|
|
username-as-common-name |
|
|
|
# Client certificate is not required |
|
|
|
# Client certificate is not required |
|
|
|
verify-client-cert none |
|
|
|
verify-client-cert none |
|
|
|
# Use the connection script when a user wants to login |
|
|
|
|
|
|
|
auth-user-pass-verify scripts/login.sh via-env |
|
|
|
|
|
|
|
# Maximum of clients |
|
|
|
# Maximum of clients |
|
|
|
max-clients 50 |
|
|
|
max-clients 50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Use the connection script when a user wants to login |
|
|
|
|
|
|
|
auth-user-pass-verify SCRIPTS_LOGIN via-env |
|
|
|
# Run this scripts when the client connects/disconnects |
|
|
|
# Run this scripts when the client connects/disconnects |
|
|
|
client-connect scripts/connect.sh |
|
|
|
client-connect SCRIPTS_CONNECT |
|
|
|
client-disconnect scripts/disconnect.sh |
|
|
|
client-disconnect SCRIPTS_DISCONNECT |