• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • 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.

Resolved OpenVPN Firewall configuration

Kulturmensch

Regular Pleskian
OpenVpn is only working on my v-server (Ubuntu 20.04.3 LTS / Plesk Osidian) when I configure iptables with the command:

iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o venet0 -j MASQERADE

After server reboot this rule has disappeared and I have to use the command again via ssh.

Is there any suggestion how to set this rule permanent surviving a reboot?

(I tried already succesless to perform a crontab @Reboot with this command. result: error iptables: command not found)
 
Since crontab etc. did not work, I have now reactivated the good old rc.local. rc.local is not available on Ubuntu 20.04.3 LTS by default. You have to set up a corresponding service that starts when you reboot. In my case iptables and a desired configuration as mentioned above can now be started at system start. If necessary, I will be happy to explain the necessary steps.
 
hello @Kulturmensch ,

good to know that you was able to solve your problem )

on ubuntu and debian OS'es there is a /etc/network/if-up.d/ folder
where you can put your scripts, that should be executed during networking start.

as I remember rc.local will be processed at the end of boot process. so, in your case it should work.
but this way may be not secure for restriction firewall rules: there will be few time when your server already booted but such rules have not been applied yet.
 
Back
Top