• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

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