mac + vultr vps + ubuntu + openvpn + ipv6 + Tunnelblick

OpenVPN is an open-source commercial software that implements virtual private network (VPN) techniques to create secure point-to-point or site-to-site connections in routed or bridged configurations and remote access facilities. It uses a custom security protocol that utilizes SSL/TLS for key exchange. It is capable of traversing network address translators (NATs) and firewalls.

For more information on OpenVPN, see Wikipedia.

Yesterday, I bought an Atlanta VPS on vultr.com and built an OpenVPN based on IPv6.

The following describes the installation steps.

step 1. Purchase VPS on vultr.com and select the operating system to be 64-bit ubuntu 19.04

This version of the public network only supports IPv6.

step 2. Since I bought the cheapest VPS, it does not contain the IPv4 address, I need to upgrade to increase the IPv4 address (install OpenVPN requires IPv4 address), pay 1$/month. Now VPS needs to pay 3.5$ per month.

Step 3. The machine logs in to the VPS remotely via ssh.

➜  ~ ssh [email protected]:****:****:***:****:****:****:e411

Step 4. Install OpenVPN

Here I am using the open source project of github openvpn-install.

openvpn-install: OpenVPN installer for Debian, Ubuntu, Fedora, CentOS and Arch Linux.

Usage

First, get the script and make it executable :

curl -O https://raw.githubusercontent.com/Angristan/openvpn-install/master/openvpn-install.sh
chmod +x openvpn-install.sh

Then run it :

./openvpn-install.sh

You need to run the script as root and have the TUN module enabled.

In your home directory, you will have .ovpn files. These are the client configuration files. Download them from your server and connect using your favorite OpenVPN client.

This will get an .ovpn file with the name custom.

Step 5. Edit the OpenVPN configuration file and enable IPv6 tunnel service.

[email protected]:~# vim /etc/openvpn/server.conf

Add the following:

server-ipv6 fd42:42:42:42::/112
tun-ipv6
push tun-ipv6
ifconfig-ipv6 fd42:42:42:42::1 fd42:42:42:42::2
push "route-ipv6 2000::/3"
push "redirect-gateway ipv6"

Reload OpenVPN Service:

[email protected]:~# /etc/init.d/openvpn restart

Step 6. Download OpenVPN mac client the Tunnelblick

Step 7. Download the .ovpn file from step 4 and update the configuration.

➜ scp [email protected]\[2001:***:****:***:****:***:****:e411\]:/root/ogoogle.ovpn .
➜ vim ogoogle.ovpn

Modify remote to:

remote IPv6 Port

Add a line configuration:

tun-ipv6

Final configuration:

Reference:Using OpenVPN with IPv6

Step 8. Start Tunnelblick and import the .ovpn configuration file.

Success.

Add a Comment

Your email address will not be published. Required fields are marked *