I changed server config for able to connect several users with an ovpn file with :
Code: Select all
duplicate-cn
I wanna when a user's device goes to sleep VPN disconnects and do not reconnect again ( I mean preventing something like alwaysOn or on-demand in iOS)
I tried to eliminate
Code: Select all
keepalive
Code: Select all
inactive 50
Code: Select all
ping-exit 50
Code: Select all
ping-restart 0
Here is my server.conf
Server config
local serverIp
port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh.pem
auth SHA512
#client-cert-not-required
#username-as-common-name
#plugin /usr/lib/x86_64-linux-gnu/openvpn/plugins/openvpn-plugin-auth-pam.so /e$
tls-crypt tc.key
topology subnet
inactive 50
server 10.8.0.0 255.255.255.0
push "redirect-gateway def1 bypass-dhcp"
ifconfig-pool-persist ipp.txt
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
cipher AES-256-CBC
user nobody
group nogroup
persist-key
status openvpn-status.log
log /var/log/openvpn/openvpn.log
log-append /var/log/openvpn/openvpn.log
verb 3
crl-verify crl.pem
explicit-exit-notify
port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh.pem
auth SHA512
#client-cert-not-required
#username-as-common-name
#plugin /usr/lib/x86_64-linux-gnu/openvpn/plugins/openvpn-plugin-auth-pam.so /e$
tls-crypt tc.key
topology subnet
inactive 50
server 10.8.0.0 255.255.255.0
push "redirect-gateway def1 bypass-dhcp"
ifconfig-pool-persist ipp.txt
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
cipher AES-256-CBC
user nobody
group nogroup
persist-key
status openvpn-status.log
log /var/log/openvpn/openvpn.log
log-append /var/log/openvpn/openvpn.log
verb 3
crl-verify crl.pem
explicit-exit-notify
and here is my client.ovpn config
Client config
client
dev tun
proto udp
remote serevrIp 1194
resolv-retry 0
nobind
persist-key
#auth-user-pass
inactive 50
ping-exit 50
ping-restart 0
remote-cert-tls server
auth SHA512
cipher AES-256-CBC
ignore-unknown-option block-outside-dns
block-outside-dns
verb 3
....