I have 2 VPN servers running.
This server routes all traffic through the VPN server
script-security 2 # must be at least 2
auth-user-pass-verify /etc/openvpn/checkUser.sh via-file
username-as-common-name # without this openvpn will use cn in the certificate as username
duplicate-cn # you may need this if everyone is using same certificate
management 127.0.0.1 1197
local local.ip.address
port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh.pem
auth SHA512
tls-crypt tc.key
topology subnet
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DOMAIN example.com"
push "dhcp-option DNS 10.1.1.157"
push "route 10.8.0.0 255.255.255.0"
push "route 10.1.1.0 255.255.255.0"
push "redirect-gateway def1 bypass-dhcp"
push "block-outside-dns"
client-to-client
keepalive 10 120
cipher AES-256-CBC
user nobody
group nogroup
persist-key
persist-tun
status /var/log/openvpn-status.log 20
log-append /var/log/openvpn-log.txt
verb 3
crl-verify crl.pem
explicit-exit-notify
This server routes on traffic to VPN network traffic through the VPN server
management 127.0.0.1 1197
script-security 3
dev tun
proto tcp
port 1194
ca /etc/openvpn/easy-rsa/pki/ca.crt
cert /etc/openvpn/easy-rsa/pki/issued/plug_423aa96d-a5ef-46df-bc3c-a9587b933118.crt
key /etc/openvpn/easy-rsa/pki/private/plug_423aa96d-a5ef-46df-bc3c-a9587b933118.key
dh none
topology subnet
server 10.8.0.0 255.255.255.0
# Set your primary domain name server address for clients
push "dhcp-option DOMAIN plug.glibix.com"
push "dhcp-option DNS 192.168.1.122"
push "block-outside-dns"
# Override the Client default gateway by using 0.0.0.0/1 and
# 128.0.0.0/1 rather than 0.0.0.0/0. This has the benefit of
# overriding but not wiping out the original default gateway.
push "route 0.0.0.0 192.0.0.0 net_gateway"
push "route 64.0.0.0 192.0.0.0 net_gateway"
push "route 128.0.0.0 192.0.0.0 net_gateway"
push "route 192.0.0.0 192.0.0.0 net_gateway"
#comment out any network from above if it conflicts with local network
#change below to the local network ip for this device
push "route 192.168.1.0 255.255.255.0"
push "route 10.8.0.0 255.255.255.0"
push "redirect-gateway def1"
client-to-client
keepalive 1800 3600
remote-cert-tls client
tls-version-min 1.2
tls-crypt /etc/openvpn/easy-rsa/pki/ta.key
cipher AES-256-CBC
auth SHA256
user nobody
group nogroup
persist-key
persist-tun
crl-verify /etc/openvpn/crl.pem
log-append /var/log/openvpn-log.txt
status-version 3
syslog
verb 3
auth-user-pass-verify /etc/openvpn/checkUser.sh via-file
username-as-common-name
duplicate-cn
#DuplicateCNs allow access control on a less-granular, per user basis.
#Remove # if you will manage access by user instead of device.
#duplicate-cn
# Generated for use by PiVPN.io
When I use management port to kick out a user from Server #1, the client still shows "connected", but when I try the same command to kick out a user from Server #2, the client shows. "Transport error" and then re-connects.
Server #2 behaviour is what I expect. Any idea why Server #1 is behaving like that?
The command I use to kill the connection is
kill IP