I have a server (Ubuntu 20.04) that I can SSH into normally. I set up OpenVPN on this server and that works fine...
Except when I start OpenVPN I loose the ability to SSH into the server.
I found this answer regarding setting firewall rules which solves that issue to some extent:
https://serverfault.com/a/918441/602437
I put those rules in a script then do: sudo ./set-ssh-rules.sh && sudo service openvpn start
and that works as expected.
Problem is, this is a manual step since the rules seem to go away after I reboot and I have to do the whole dance again.
How do I get these rules either persist? Or in the more realistic case that the OpenVPN service is "enabled", have the rules set at boot but before the init system (systemd?) starts the OpenVPN service.
I'm sure the answer to this is scattered around the internet but I couldn't peice it together - sorry.
Many thanks in advance.