Uninstall¶
Removing OpenVPN¶
To completely remove OpenVPN and all associated configuration:
What Gets Removed¶
The uninstall process removes:
- OpenVPN packages — the openvpn package and dependencies
- Configuration files —
/etc/openvpn/server/directory - PKI infrastructure — CA, server and client certificates
- Firewall rules — all OpenVPN-related firewall rules
- firewalld: port forwarding and masquerade rules
- nftables:
/etc/nftables/openvpn.nft - iptables: scripts and systemd service
- Sysctl settings —
/etc/sysctl.d/99-openvpn.conf - Systemd service —
openvpn-server@server.service - Unbound DNS — if it was installed by the script
- SELinux rules — if SELinux port rules were added
Data loss warning
Uninstallation deletes all certificates and keys permanently. Client .ovpn files in users' home directories are not removed, but they will no longer work.
Reinstallation¶
After uninstalling, you can run the installation again:
A completely fresh PKI infrastructure will be created. All clients will need new .ovpn files.