• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

VPN: How to edit openvpn.conf on server?

Just_Matt

New Pleskian
Hi all,

as indicated in remarks of /usr/local/psa/var/modules/vpn/openvpn.conf :

#DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
#SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.

I need to add following line to this openvpn.conf :

push "redirect-gateway def1"

VPN-connection between Tunnelblick on running on my Mac and server running Plesk 11.0 works. Now I need to route all my requests on my Mac through this VPN-connection, which does not work yet. I have already added 'redirect-gateway def1' to my Tunnelblick conf, but this doesn't work. Now I found on the web, that I need to add above mentioned line on server-conf.

As it gets overwritten, after every restart of VPN-Server, I need to know, where I can add this line.

Thank you and best regards,

Matthias
 
Maybe you could suggest adding additional configuration directives via http://plesk.uservoice.com ?

In the meantime, you have multiple options. Here are some suggestions:

1) Don't use the Plesk VPN module. Remove it, then manually install and configure openvpn (maybe you could copy the config and key files from the plesk installation first to give you a starting point. Note that there are two main components. the config file, and the various parts of the keys. all are referenced in the config file so you should be able to find them quite easily)

2) Locate the openvpn startup script and modify it so that your line is added to the config before openvpn is started but after plesk has generated the config.
I do find it odd that the configuration is recreated every time the service is started, but there is probably a good reason!
 
I know this post is very old, but i am answering because i found kind of a workaround, while still having the same problem.

You can start the vpn -> then edit the config file -> and then enter the following command:

Code:
# /etc/init.d/psa-vpn reconfigure

This forces the VPN to reread the configuration file while NOT regenerating it.

Yes, this has to be done everytime the VPN Service is restarted, but at least it's a workaround!
 
Back
Top