Answer the question
In order to leave comments, you need to log in
Why doesn't connect to openvpn server when connect/disconnect scripts are enabled?
Here is the openvpn server configuration:
auth-user-pass-verify /etc/openvpn/verify.py via-file
client-connect /etc/openvpn/connect.py
client-disconnect /etc/openvpn/disconnect.py
script-security 2
port 1194
proto udp
dev tun
user nobody
group nogroup
persist-key
persist-tun
keepalive 10 120
topology subnet
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "dhcp-option DNS 1.0.0.1"
push "dhcp-option DNS 1.1.1.1"
push "redirect-gateway def1 bypass-dhcp"
dh none
ecdh-curve prime256v1
tls-crypt tls-crypt.key 0
crl-verify crl.pem
ca ca.crt
cert server_9z8PW46XfvUdFxZR.crt
key server_9z8PW46XfvUdFxZR.key
auth SHA256
cipher AES-128-GCM
ncp-ciphers AES-128-GCM
tls-server
tls-version-min 1.2
tls-cipher TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
status /var/log/openvpn/status.log
verb 3
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import json
f = open('/etc/openvpn/connect.log', 'w')
f.write(json.dumps(sys.argv))
f.close()
sys.exit(0)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import json
f = open('/etc/openvpn/disconnect.log', 'w')
f.write(json.dumps(sys.argv))
f.close()
sys.exit(0)
Answer the question
In order to leave comments, you need to log in
The script did not have write permissions. Looked at the error in /var/log/syslog
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question