Introduction: This guide will walk you through setting up OpenVPN Server 2.6.3 on your Virtual Private Server (VPS) using TurnKey Linux. We'll cover accessing your VPS via SSH, completing the initial TurnKey Linux configuration, configuring OpenVPN server settings, and connecting clients to your VPN.
Step 1: Access Your VPS via SSH
-
Obtain Your VPS Details:
- IP Address: Provided in your welcome email.
- Root Password: Provided in your welcome email.
- SSH Port: Default is 22 unless specified otherwise.
-
Install an SSH Client:
- Windows: Download PuTTY.
- macOS/Linux: Use the built-in Terminal application.
-
Connect to Your VPS:
- Open your SSH client.
- For Windows (PuTTY):
- Enter your VPS IP in the "Host Name" field.
- Ensure the port is set to 22.
- Click "Open."
- For macOS/Linux Terminal:
<Your-VPS-IP>
with your server's IP address.
Replace
-
Authenticate:
- When prompted, enter the root password.
- Upon successful login, you'll have terminal access to your VPS.
Step 2: Complete TurnKey Linux First Boot Configuration
Upon first login, TurnKey Linux will guide you through initial setup:
-
Set Root Password:
- You'll be prompted to set a new password for the root user.
-
Configure OpenVPN Server:
- Set a passphrase to secure your OpenVPN configuration files.
-
Configure Domain and SSL:
- Enter your domain name when prompted (optional).
- Opt to configure a Let's Encrypt SSL certificate for web-based admin access (if domain is set).
Step 3: Configure OpenVPN Server
-
Access the Admin Interface:
- Open your browser and navigate to
https://<Your-VPS-IP>:943/admin
. - Log in with the root credentials you set during the setup.
- Open your browser and navigate to
-
Configure the OpenVPN Network:
- Set the VPN subnet and port (default: UDP port 1194).
- Ensure your firewall allows the configured VPN port.
-
Create User Profiles:
- Generate user profiles for your clients in the admin panel.
- Download the .ovpn files for distribution to your clients.
Step 4: Connect Clients to Your OpenVPN Server
-
Install OpenVPN Client:
- Windows/Mac: Download from OpenVPN Community Downloads.
- Linux: Install via package manager:
sudo apt-get install openvpn
(Debian/Ubuntu).
-
Import Configuration File:
- Open the OpenVPN client and import the .ovpn file provided.
-
Connect to the VPN:
- Start the VPN client and connect using the imported configuration.
- Verify your connection by checking your IP on WhatIsMyIPAddress.
Step 5: Point Your Domain to Your VPS (Optional)
If you wish to use a domain for the admin interface, you can configure it directly using our control panel (if registered with us) or log in to your domain registrar to update DNS settings.
Option A: Domain Registered with Us
-
Access Domain Management:
- Log in to your account on our platform.
- Navigate to the "Domain Management" or "DNS Settings" section.
-
Create an A Record:
- Host:
@
(represents the root domain) - Points to: Your VPS IP address
- TTL: Default or 3600 seconds
- Host:
-
Save Changes:
- Apply the new DNS settings.
- Note: DNS changes may take up to 24 hours to propagate.
Option B: Domain Registered Elsewhere
-
Log in to Your Domain Registrar:
- Access the DNS management area.
-
Add an A Record:
- Host:
@
- Points to: Your VPS IP address
- TTL: Default or 3600 seconds
- Host:
-
Save Changes:
- Apply the updated DNS settings.
- Allow time for DNS propagation.
Step 6: Management Tools
Additional Resources:
- TurnKey Linux OpenVPN Appliance: TurnKey Linux: OpenVPN Appliance
- PuTTY SSH Client: PuTTY Download Page
- OpenVPN Documentation: OpenVPN Official Documentation
- Let's Encrypt Documentation: Let's Encrypt Official Site
Note:
- Ensure your VPS firewall allows UDP traffic on the OpenVPN port (default 1194).
- DNS changes can take time to propagate globally.
Tips and Troubleshooting
- Connection Issues: Check that the VPN port is open on your firewall and accessible.
- Client Issues: Ensure the .ovpn file matches the server configuration.
- Logs: Review logs under
/var/log/openvpn/
for debugging.