mirror of
https://github.com/Nyr/openvpn-install.git
synced 2024-11-24 14:06:07 +03:00
separated documentation files
This commit is contained in:
parent
f6c1cd5519
commit
3126e9f439
101
Documentation/client-ovpn.md
Normal file
101
Documentation/client-ovpn.md
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
# Client Setup: OpenVPN
|
||||||
|
|
||||||
|
## Table of Contents
|
||||||
|
|
||||||
|
- [Windows](#windows)
|
||||||
|
- [MacOS](#macos)
|
||||||
|
- [Linux](#linux)
|
||||||
|
- [Android](#android)
|
||||||
|
- [iOS](#ios)
|
||||||
|
- [Troubleshooting](#troubleshooting)
|
||||||
|
|
||||||
|
## Windows
|
||||||
|
|
||||||
|
- Configure OpenVPN
|
||||||
|
- Download and install [OpenVPN](https://openvpn.net/index.php/open-source/downloads.html)
|
||||||
|
- Start `OpenVPN GUI` from the Start Menu
|
||||||
|
- Locate the OpenVPN icon in the Task Bar, right click, and select `Import file...`
|
||||||
|
- Select your OVPN file
|
||||||
|
- Right click on the OpenVPN icon again, and select `Connect`
|
||||||
|
- To disconnect
|
||||||
|
- Locate the OpenVPN icon in the Task Bar, right click, and select `Disconnect`
|
||||||
|
- Locate the `stunnel` icon in the Task Bar, right click, and select `Exit`
|
||||||
|
|
||||||
|
## MacOS
|
||||||
|
|
||||||
|
- Configure OpenVPN
|
||||||
|
- Download and install [Tunnelblick](https://tunnelblick.net/)
|
||||||
|
- Locate your OVPN file in `Finder`, and double-click to open it.
|
||||||
|
- Locate the `Tunnelblick` icon on the top-right corner. Click on it, and select the server you want to connect to.
|
||||||
|
- To disconnect
|
||||||
|
- Locate the `Tunnelblick` icon on the top-right corner. Click on it, and select `Disconnect All`.
|
||||||
|
- To stop `stunnel`, run this in `Terminal`: `sudo killall stunnel`
|
||||||
|
|
||||||
|
## Linux
|
||||||
|
|
||||||
|
- Install `openvpn` on your device.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Debian/Ubuntu
|
||||||
|
sudo apt install -y openvpn
|
||||||
|
|
||||||
|
# CentOS/RHEL
|
||||||
|
sudo yum install -y epel-release
|
||||||
|
sudo yum install -y openvpn
|
||||||
|
|
||||||
|
# Fedora
|
||||||
|
sudo dnf install -y openvpn
|
||||||
|
```
|
||||||
|
|
||||||
|
- Connect to OpenVPN
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Run this in the directory that contains your OVPN file
|
||||||
|
# Replace 'client' with your OVPN filename
|
||||||
|
openvpn --config client.ovpn
|
||||||
|
```
|
||||||
|
|
||||||
|
- To disconnect
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Stop OpenVPN
|
||||||
|
sudo killall openvpn
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Android
|
||||||
|
|
||||||
|
- Download [OpenVPN for Android](https://play.google.com/store/apps/details?id=de.blinkt.openvpn) from Google Play Store
|
||||||
|
- Transfer your OVPN file to your device.
|
||||||
|
- Click on the `import` icon (between `+` and `Menu` icon), and select your OVPN file.
|
||||||
|
- Click on the check mark to confirm import.
|
||||||
|
- Click on a profile name to connect.
|
||||||
|
- If you see a `connection request` popup, select `Connect` or `OK`.
|
||||||
|
- To disconnect: Select the `VPN connection` notification in your notification center, and click `Disconnect` in the popup.
|
||||||
|
|
||||||
|
## iOS
|
||||||
|
|
||||||
|
- Download [OpenVPN Connect](https://itunes.apple.com/app/openvpn-connect/id590379981) from App Store
|
||||||
|
- Send the OVPN file as an attachment to yourself via email, and open it in your email app on the iOS device.
|
||||||
|
- If you see a popup with a list of different apps, select `OpenVPN Connect`.
|
||||||
|
- Click on the switch next to `Connection`, make sure it's at the `ON` position.
|
||||||
|
- To disconnect: click on the switch next to `Connection`, make sure it's at the `OFF` position.
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
- If you're unable to connect to your server with OpenVPN...
|
||||||
|
|
||||||
|
- Also check if OpenVPN is running on your server.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# You should see openvpn in the output
|
||||||
|
ps -A | grep openvpn
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
- If you still can't connect, try removing and reinstalling OpenVPN on your server.
|
||||||
|
- Run the install script and select `Uninstall`
|
||||||
|
- Run the install script again and make sure you enter the correct information.
|
||||||
|
|
||||||
|
|
149
Documentation/client-ssl.md
Normal file
149
Documentation/client-ssl.md
Normal file
@ -0,0 +1,149 @@
|
|||||||
|
# Client Setup: OpenVPN over SSL
|
||||||
|
|
||||||
|
## Table of Contents
|
||||||
|
|
||||||
|
- [Windows](#windows)
|
||||||
|
- [MacOS](#macos)
|
||||||
|
- [Linux](#linux)
|
||||||
|
- [Android](#android)
|
||||||
|
- [iOS](#ios)
|
||||||
|
- [Troubleshooting](#troubleshooting)
|
||||||
|
|
||||||
|
## Windows
|
||||||
|
|
||||||
|
- Configure `stunnel`
|
||||||
|
- Download and install [stunnel](https://www.stunnel.org/downloads.html)
|
||||||
|
- Start `stunnel` by launching `stunnel GUI start ` from the Start Menu
|
||||||
|
- Locate the `stunnel` icon in the Task Bar, right click, and select `Edit Configuration`
|
||||||
|
- Copy everything in `stunnel.conf` and paste into the `stunnel` configuration file. Save and close it after editing.
|
||||||
|
- Right click on the `stunnel` icon again, and select `Reload Configuration`
|
||||||
|
- Configure OpenVPN
|
||||||
|
- Download and install [OpenVPN](https://openvpn.net/index.php/open-source/downloads.html)
|
||||||
|
- Start `OpenVPN GUI` from the Start Menu
|
||||||
|
- Locate the OpenVPN icon in the Task Bar, right click, and select `Import file...`
|
||||||
|
- Select your OVPN file
|
||||||
|
- Right click on the OpenVPN icon again, and select `Connect`
|
||||||
|
- To disconnect
|
||||||
|
- Locate the OpenVPN icon in the Task Bar, right click, and select `Disconnect`
|
||||||
|
- Locate the `stunnel` icon in the Task Bar, right click, and select `Exit`
|
||||||
|
|
||||||
|
## MacOS
|
||||||
|
|
||||||
|
- Configure `stunnel`
|
||||||
|
|
||||||
|
- Install [Homebrew](https://brew.sh/)
|
||||||
|
|
||||||
|
- Install `stunnel` via Homebrew by running this in `Terminal`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
brew install stunnel
|
||||||
|
```
|
||||||
|
|
||||||
|
- Configure and start `stunnel`
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# In order to run these, you need to log in to your Mac with an administrator account.
|
||||||
|
# When prompted for password, enter the password of the current user,
|
||||||
|
|
||||||
|
# Run this in the directory that contains 'stunnel.conf'
|
||||||
|
sudo cp stunnel.conf /usr/local/etc/stunnel/stunnel.conf
|
||||||
|
# Start stunnel
|
||||||
|
sudo stunnel
|
||||||
|
```
|
||||||
|
|
||||||
|
- Configure OpenVPN
|
||||||
|
|
||||||
|
- Download and install [Tunnelblick](https://tunnelblick.net/)
|
||||||
|
- Locate your OVPN file in `Finder`, and double-click to open it.
|
||||||
|
- Locate the `Tunnelblick` icon on the top-right corner. Click on it, and select the server you want to connect to.
|
||||||
|
|
||||||
|
- To disconnect
|
||||||
|
|
||||||
|
- Locate the `Tunnelblick` icon on the top-right corner. Click on it, and select `Disconnect All`.
|
||||||
|
- To stop `stunnel`, run this in `Terminal`: `sudo killall stunnel`
|
||||||
|
|
||||||
|
## Linux
|
||||||
|
|
||||||
|
- Install `stunnel` and `openvpn` on your device.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Debian/Ubuntu
|
||||||
|
sudo apt install -y stunnel openvpn
|
||||||
|
|
||||||
|
# CentOS/RHEL
|
||||||
|
sudo yum install -y epel-release
|
||||||
|
sudo yum install -y stunnel openvpn
|
||||||
|
|
||||||
|
# Fedora
|
||||||
|
sudo dnf install -y stunnel openvpn
|
||||||
|
```
|
||||||
|
|
||||||
|
- Configure and start `stunnel`
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Run this in the directory that contains 'stunnel.conf'
|
||||||
|
sudo cp stunnel.conf /etc/stunnel/
|
||||||
|
# Start stunnel
|
||||||
|
sudo stunnel
|
||||||
|
```
|
||||||
|
|
||||||
|
- Connect to OpenVPN
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Run this in the directory that contains your OVPN file
|
||||||
|
# Replace 'client' with your OVPN filename
|
||||||
|
openvpn --config client.ovpn
|
||||||
|
```
|
||||||
|
|
||||||
|
- To disconnect
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Stop OpenVPN
|
||||||
|
sudo killall openvpn
|
||||||
|
|
||||||
|
# Stop stunnel
|
||||||
|
sudo killall stunnel
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Android
|
||||||
|
|
||||||
|
- OpenVPN is supported on Android, but OpenVPN over SSL support isn't very good.
|
||||||
|
- If you installed OpenVPN without SSL, see [Client Setup: OpenVPN](Documentation/client-ovpn.md)
|
||||||
|
|
||||||
|
## iOS
|
||||||
|
|
||||||
|
- OpenVPN is supported on iOS, but OpenVPN over SSL is not supported.
|
||||||
|
- If you installed OpenVPN without SSL, see [Client Setup: OpenVPN](Documentation/client-ovpn.md)
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
- If you're unable to connect to your server with OpenVPN...
|
||||||
|
|
||||||
|
- Please check if `stunnel` is running on your device.
|
||||||
|
|
||||||
|
- On Windows, check if the `stunnel` icon is present in the Task Bar (bottom right).
|
||||||
|
- Run this to check on MacOS or Linux (both client and server)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# You should see stunnel in the output
|
||||||
|
ps -A | grep stunnel
|
||||||
|
```
|
||||||
|
|
||||||
|
- Also check if both `stunnel` and OpenVPN are running on your server.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# You should see stunnel in the output
|
||||||
|
ps -A | grep stunnel
|
||||||
|
|
||||||
|
# You should see openvpn in the output
|
||||||
|
ps -A | grep openvpn
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
- If you still can't connect, try removing and reinstalling OpenVPN on your server.
|
||||||
|
- Run the install script and select `Uninstall`
|
||||||
|
- Run the install script again and make sure you enter the correct information.
|
||||||
|
|
||||||
|
|
113
README.md
113
README.md
@ -8,12 +8,7 @@
|
|||||||
|
|
||||||
- [Description](#description)
|
- [Description](#description)
|
||||||
- [Installation](#installation)
|
- [Installation](#installation)
|
||||||
- [Configure clients](#configure-clients)
|
- [Client setup](#client-setup)
|
||||||
- [Windows](#windows)
|
|
||||||
- [MacOS](#macos)
|
|
||||||
- [Linux](#linux)
|
|
||||||
- [Android](#android)
|
|
||||||
- [iOS](#ios)
|
|
||||||
- [Troubleshooting](#troubleshooting)
|
- [Troubleshooting](#troubleshooting)
|
||||||
- [FAQ](#faq)
|
- [FAQ](#faq)
|
||||||
- [Donations](#donations)
|
- [Donations](#donations)
|
||||||
@ -29,7 +24,14 @@ This script lets you set up your own OpenVPN server in minutes, even if you no e
|
|||||||
If you run into any issues during installation, please refer to [Troubleshooting](#troubleshooting).
|
If you run into any issues during installation, please refer to [Troubleshooting](#troubleshooting).
|
||||||
### Install on CentOS/Debian/Ubuntu
|
### Install on CentOS/Debian/Ubuntu
|
||||||
|
|
||||||
|
- **Please note: if your server is running the following OS versions, please select `AES-256-CBC` when you're asked to select a cipher mode.**
|
||||||
|
|
||||||
|
- CentOS 6 or older
|
||||||
|
- Debian 8 (Jessie) or older
|
||||||
|
- Ubuntu 16.10 or older
|
||||||
|
|
||||||
- Run this in a terminal on your server, and follow the on-screen instructions:
|
- Run this in a terminal on your server, and follow the on-screen instructions:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Download the script
|
# Download the script
|
||||||
wget https://raw.githubusercontent.com/birkhoffcheng/openvpn-install/master/openvpn-install.sh
|
wget https://raw.githubusercontent.com/birkhoffcheng/openvpn-install/master/openvpn-install.sh
|
||||||
@ -37,12 +39,15 @@ If you run into any issues during installation, please refer to [Troubleshooting
|
|||||||
# Run the install script
|
# Run the install script
|
||||||
sudo bash openvpn-install.sh
|
sudo bash openvpn-install.sh
|
||||||
|
|
||||||
|
# Note: If you're running Ubuntu 16.10 or older
|
||||||
|
|
||||||
# Start stunnel (only if you're using OpenVPN over SSL)
|
# Start stunnel (only if you're using OpenVPN over SSL)
|
||||||
sudo stunnel
|
sudo stunnel
|
||||||
```
|
```
|
||||||
- Once it finishes, your OpenVPN server is up and running! You should [configure client devices](#configure-clients) next.
|
|
||||||
|
|
||||||
## Configure clients
|
- Once it finishes, your OpenVPN server is up and running! You should [set up client devices](#client-setup) next.
|
||||||
|
|
||||||
|
## Client setup
|
||||||
|
|
||||||
### Before continuing...
|
### Before continuing...
|
||||||
|
|
||||||
@ -52,69 +57,8 @@ If you run into any issues during installation, please refer to [Troubleshooting
|
|||||||
|
|
||||||
### OS-specific setup processes
|
### OS-specific setup processes
|
||||||
|
|
||||||
#### Windows
|
- [OpenVPN (without SSL)](Documentation/client-ovpn.md)
|
||||||
|
- [OpenVPN over SSL](Documentation/client-ssl.md)
|
||||||
- Configure `stunnel`. Skip to the next section if you're NOT using OpenVPN over SSL
|
|
||||||
- Download and install [stunnel](https://www.stunnel.org/downloads.html)
|
|
||||||
- Start `stunnel` by launching `stunnel GUI start ` from the Start Menu
|
|
||||||
- Locate the `stunnel` icon in the Task Bar, right click, and select `Edit Configuration`
|
|
||||||
- Copy everything in `stunnel.conf` and paste into the `stunnel` configuration file. Save and close it after editing.
|
|
||||||
- Right click on the `stunnel` icon again, and select `Reload Configuration`
|
|
||||||
- Configure OpenVPN
|
|
||||||
- Download and install [OpenVPN](https://openvpn.net/index.php/open-source/downloads.html)
|
|
||||||
- Start `OpenVPN GUI` from the Start Menu
|
|
||||||
- Locate the OpenVPN icon in the Task Bar, right click, and select `Import file...`
|
|
||||||
- Select your OVPN file
|
|
||||||
- Right click on the OpenVPN icon again, and select `Connect`
|
|
||||||
|
|
||||||
#### MacOS
|
|
||||||
|
|
||||||
- Supported. Instructions coming soon.
|
|
||||||
|
|
||||||
#### Linux
|
|
||||||
|
|
||||||
- Install `stunnel` and `openvpn` on your device.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Debian/Ubuntu
|
|
||||||
sudo apt install -y stunnel openvpn
|
|
||||||
|
|
||||||
# CentOS/RHEL
|
|
||||||
sudo yum install -y epel-release
|
|
||||||
sudo yum install -y stunnel openvpn
|
|
||||||
|
|
||||||
# Fedora
|
|
||||||
sudo dnf install -y stunnel openvpn
|
|
||||||
```
|
|
||||||
|
|
||||||
- If you're using OpenVPN over SSL, configure and start `stunnel`
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Run this in the directory that contains 'stunnel.conf'
|
|
||||||
sudo cp stunnel.conf /etc/stunnel/
|
|
||||||
# Start stunnel
|
|
||||||
sudo stunnel
|
|
||||||
```
|
|
||||||
|
|
||||||
- Connect to OpenVPN
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Run this in the directory that contains your OVPN file
|
|
||||||
# Replace 'client' with your OVPN filename
|
|
||||||
openvpn --config client.ovpn
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Android
|
|
||||||
|
|
||||||
- OpenVPN is supported on Android, but OpenVPN over SSL support isn't very good.
|
|
||||||
- If you installed OpenVPN without SSL, download [OpenVPN for Android](https://play.google.com/store/apps/details?id=de.blinkt.openvpn)
|
|
||||||
- Import your OVPN file inside the app.
|
|
||||||
|
|
||||||
#### iOS
|
|
||||||
|
|
||||||
- OpenVPN is supported on iOS, but OpenVPN over SSL is not supported.
|
|
||||||
- If you installed OpenVPN without SSL, download [OpenVPN Connect](https://itunes.apple.com/app/openvpn-connect/id590379981)
|
|
||||||
- Follow the on-screen instruction to import the OpenVPN profile.
|
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
@ -130,6 +74,33 @@ If you run into any issues during installation, please refer to [Troubleshooting
|
|||||||
|
|
||||||
- `The TUN device is not available. You need to enable TUN before running this script`: Follow [this guide](https://help.skysilk.com/support/solutions/articles/9000136471-how-to-enable-tun-tap-on-linux-vps-with-skysilk).
|
- `The TUN device is not available. You need to enable TUN before running this script`: Follow [this guide](https://help.skysilk.com/support/solutions/articles/9000136471-how-to-enable-tun-tap-on-linux-vps-with-skysilk).
|
||||||
|
|
||||||
|
- If you're unable to connect to your server with OpenVPN...
|
||||||
|
|
||||||
|
- Please check if `stunnel` is running on your device. (if you're using OpenVPN over SSL)
|
||||||
|
|
||||||
|
- On Windows, check if the `stunnel` icon is present in the Task Bar (bottom right).
|
||||||
|
- Run this to check on MacOS or Linux (both client and server)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# You should see stunnel in the output
|
||||||
|
ps -A | grep stunnel
|
||||||
|
```
|
||||||
|
|
||||||
|
- Also check if both `stunnel` (if applicable) and OpenVPN are running on your server.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# You should see stunnel in the output (if you're using OpenVPN over SSL)
|
||||||
|
ps -A | grep stunnel
|
||||||
|
|
||||||
|
# You should see openvpn in the output
|
||||||
|
ps -A | grep openvpn
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
- If you still can't connect, try removing and reinstalling OpenVPN on your server.
|
||||||
|
- Run the install script and select `Uninstall`
|
||||||
|
- Run the install script again and make sure you enter the correct information.
|
||||||
|
|
||||||
## FAQ
|
## FAQ
|
||||||
|
|
||||||
### Where to find a VPS
|
### Where to find a VPS
|
||||||
|
Loading…
Reference in New Issue
Block a user