Install Wireguard VPN to reach IPv6 only servers
published on
There are some places (such as Scaleway) where you can purchase a server and choose not to have an IPv4 address. What you are left with is an IPv6 address only.
The problem with only having IPv6 is that, whilst it might have saved you money, IPv6 addresses aren't as common as IPv4 and some services don't use them.
For the purposes of this article the main issue is that you cannot connect to them without having an IPv6 address on the system you wish to connect from. Not all ISPs yet are IPv6 capable (some countries are better than others).
My article on using Cloudflare Warp explains one way around the problem of accessing your IPv6 only server or VPS from your IPv4 connection.
Another way of doing this is to setup a server which provides an IPv4 and an IPv6 (even if the IPv4 is shared) and set up a VPN on it.
Installing the Wireguard VPN server
The Wireguard VPN is easy to set up and doesn't require very many resources.
This article shows how to set the Wireguard VPN on a NAT server I purchased from Web Horizon. My only reason for choosing this company was that I took advantage of a really cheap offer they had on at the time.
Purchasing a NAT VPS means that you share an IPv4 address with other people and are provided a number of ports which you can map to others you might use for certain services. You also receive a further port for connecting to your server via SSH.
Once you have purchased your NAT VPS you need to login to the control panel and create an IPv6 address from the range you are given.
You then need to turn on TUN/TAP which your Wireguard VPN will need.
Once these are dealt with reboot the server. Once it has finished rebooting SSH in using the public (shared) IPv4 and your SSH port.
Once inside the system do the usual upgrades (if there are any to be done):
apt update && apt upgrade
After this is finished run the following command to install the Wireguard server on your VPS:
wget https://git.io/wireguard -O wireguard-install.sh && bash wireguard-install.sh
You will now find a configuration file saved in the current directory. Copy the contents of this file into a text file saved on your own main computer.
Installing Wireguard on your PC
Visit https://www.wireguard.com/ and download the software for your operating system. Install it as usual and run it. Use the configuration file you saved earlier to create connection.
Conclusion
Once you connect to your Wireguard VPN you will now be able to connect to IPv6 only systems or VPS and work as you normally do.
