OpenVPN on CentOS not working after restart

This forum is for general conversation and user-user networking.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
diegomen
OpenVpn Newbie
Posts: 1
Joined: Thu Dec 29, 2022 1:42 am

OpenVPN on CentOS not working after restart

Post by diegomen » Thu Dec 29, 2022 1:47 am

Hi all,

I installed OpenVPN with Markontech's script and it works like a charm ( https://markontech.com/linux/install-op ... ian-10-11/)

On Debian I had no issues. However, I need this to run on the same server on which I have FreePbx running, so I installed it on the FreePbx distro, CentOS. It works perfectly until I restart. Once I reboot the server, I can still connect to the VPN but there is no incoming traffic. I checked the status and there are no errors. If I remove and reinstall it works again. Please help me out how can I get more info so I can fix the issue.

Thanks in advance for your help.

djp
OpenVpn Newbie
Posts: 1
Joined: Fri Mar 03, 2023 9:58 pm

OpenVPN on CentOS not working after restart

Post by djp » Fri Mar 03, 2023 10:00 pm

That is exactly what is happening to me as well. You will notice that on the FreePBX openVPN will stop working after about a day. On CentOS 7 x64, it only takes a reboot and BAM... No more internet traffic even though we can connect.

I imagine this is CentOS that is doing something on a reboot.

gerhard-wien
OpenVpn Newbie
Posts: 2
Joined: Fri Mar 31, 2023 4:22 pm

Re: OpenVPN on CentOS not working after restart

Post by gerhard-wien » Sat Apr 01, 2023 10:51 am

If you haven't fixed it yourself by now...
After a new install and openvpn up and running:
Check what related services arr running.

Code: Select all

sudo systemctl | grep vpn
will show them.
Also check the status of the services:

Code: Select all

sudo systemctl status .... 
Also dump the firewall settings to a file

Code: Select all

sudo iptables-save > some_file
Now reboot and repeat the above commands and check for differences.

I had a similar problem when iptables-openvpn.service was started before the network was up.
The clue to that was in comparing the output from iptables-save before / after the reboot.

Gerhard

Post Reply