2025-04-14 15:55:32 -04:00

57 lines
1.5 KiB
Markdown

# OpenVPNInstaller
A simple bash script to automate the installation and configuration of OpenVPN on Linux systems.
## Description
This script automates the process of installing OpenVPN and configuring it with your VPN configuration file (.ovpn). It handles the installation of OpenVPN, copying your configuration file to the correct location, and setting up the service to start automatically.
## Requirements
- Linux operating system
- Root/sudo privileges
- An existing .ovpn configuration file
- Internet connection for package installation
## Installation
1. Clone or download this repository
2. Make the script executable:
```bash
chmod +x install.sh
```
## Usage
1. Run the script with sudo:
```bash
sudo ./install.sh
```
2. When prompted, enter the full path to your .ovpn configuration file
The script will:
- Install OpenVPN if not already installed
- Copy your .ovpn file to `/etc/openvpn/client/`
- Start the OpenVPN service
- Enable the service to start automatically on boot
## Notes
- The script must be run with root privileges
- Make sure your .ovpn file is valid and contains all necessary configuration
- The VPN connection will be established automatically after installation
## Troubleshooting
If you encounter any issues:
1. Verify that your .ovpn file is valid
2. Check the OpenVPN service status:
```bash
sudo systemctl status openvpn-client@[your-config-name]
```
3. Check the OpenVPN logs:
```bash
sudo journalctl -u openvpn-client@[your-config-name]
```