• 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.

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