Simple OpenVPN server installer and manager for Debian/Ubuntu with automatic interface detection, client profile generation, NAT setup and colored menu.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-03 09:51:39 +02:00
.github/workflows Add GitLab and Forgejo repository sync 2026-09-03 09:51:39 +02:00
images v1.0.0 — Initial release 2026-05-01 00:10:41 +02:00
.gitignore Update .gitignore 2026-05-07 21:22:31 +02:00
CHANGELOG.md v1.0.0 — Initial release 2026-05-01 00:10:41 +02:00
CODE_OF_CONDUCT.md Migrate branding to neikiri.dev 2026-05-16 22:13:27 +02:00
CONTRIBUTING.md v1.0.0 — Initial release 2026-05-01 00:10:41 +02:00
LICENSE v1.0.0 — Initial release 2026-05-01 00:10:41 +02:00
openvpn-installer.sh v1.0.0 — Initial release 2026-05-01 00:10:41 +02:00
README.md Migrate branding to neikiri.dev 2026-05-16 22:14:54 +02:00
SECURITY.md Migrate branding to neikiri.dev 2026-05-16 22:13:27 +02:00

OpenVPN Auto Installer

Linux Debian Ubuntu
Bash License Version


Menu

Features

  • ⚙️ Install OpenVPN server
  • Remove OpenVPN server
  • 🔄 Reinstall OpenVPN server
  • 🌐 Auto-detect public network interface
  • 🌍 Auto-detect public IPv4
  • 📄 Generate client .ovpn profile
  • 🔥 Automatic NAT (iptables) configuration
  • 🔁 Enable IP forwarding
  • 🎨 Colored terminal menu
  • 💾 Persistent firewall rules (iptables-save)
  • CLI arguments support (non-interactive mode)

🐧 Supported systems

  • Debian 11 / 12
  • Ubuntu 20.04 / 22.04 / 24.04

📦 Installation

git clone https://github.com/neikiri/openvpn-auto-installer.git
cd openvpn-auto-installer
chmod +x openvpn-installer.sh
sudo ./openvpn-installer.sh

CLI Usage (Non-interactive mode)

You can run the script without menu:

sudo ./openvpn-installer.sh install
sudo ./openvpn-installer.sh remove
sudo ./openvpn-installer.sh reinstall

Show help:

sudo ./openvpn-installer.sh --help

📁 Output

Client config will be created in the home directory of the user running sudo:

/home/username/client.ovpn

⚠️ Warning

This script modifies:

  • OpenVPN configuration
  • iptables firewall rules
  • system networking settings

👉 Use it only on a VPS or server where you understand these changes.


📄 License

This project is licensed under the MIT License — see the LICENSE file for details.


👨‍💻 Author

neikiri GitHub: https://github.com/neikiri


📬 Contact

📧 Email: neikiri@neikiri.dev