1

On Arch linux I have OpenVpn server. It works well. However, when I add this to its config:

script-security 2
duplicate-cn
up /etc/openvpn/server/script1.sh
client-connect /etc/server/openvpn/script1.sh
client-disconnect /etc/server/openvpn/script1.sh

It won't launch anymore and it's not clear what the error is. I'm The file /etc/server/openvpn/script1.sh exists.

$ sudo systemctl restart openvpn-server@server123.service                                                                         
Job for openvpn-server@server123.service failed because the control process exited with error code.                                                          
See "systemctl  status openvpn-server@server123.service" and "journalctl  -xe" for details.  

And in systemctl status openvpn-server@server123.service:

systemd[1]: Stopped OpenVPN service for server123.                                                                                 
systemd[1]: Starting OpenVPN service for server123...                                                                              
systemd[1]: openvpn-server@server123.service: Main process exited, code=exited, status=1/FAILURE                                   
systemd[1]: Failed to start OpenVPN service for server123.   

And nothing else. What can be the cause?

Thomas
  • 4,225
  • 5
  • 23
  • 28
Jodari
  • 89
  • 1
  • 1
  • 6

1 Answers1

0

You get access to the exact error code by running OpenVPN in the foreground. If the problem only appears after adding these lines, they either have errors or are in the wrong place.

What I can tell from the configuration is that you are using two different paths supposedly for the same script, so the other might be wrong. Is the path actually /etc/openvpn/server/script1.sh, instead of /etc/server/openvpn/script1.sh, i.e. server/ and openvpn/ might be in wrong order?

Esa Jokinen
  • 46,944
  • 3
  • 83
  • 129