• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Resolved OpenVPN Firewall configuration

Jürgen_T

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