Nyr / openvpn-install

OpenVPN road warrior installer for Ubuntu, Debian, AlmaLinux, Rocky Linux, CentOS and Fedora
MIT License
18.66k stars 4.81k forks source link

Clients can not connect after change ip of server #1069

Closed fpgi closed 8 months ago

fpgi commented 9 months ago

Hi some datacenter have this ability to change ip of server like Hetzner after change ip and start server , my clients can not connect to server i change /etc/openvpn/server/server.conf ( i think it is exact file of openvpn configuration ) and change config file of user but still can not connect . i must uninstall openvpn via script and install that again and after that it work . which files must change for successful connection of user after change ip ?

Nyr commented 8 months ago

In Debian/Ubuntu: systemctl stop openvpn-iptables.service

Then, edit the /etc/systemd/system/openvpn-iptables.service file and change references to your IP address.

And start again with: systemctl start openvpn-iptables.service

For RHEL-based distros you would need to edit the firewalld rules.