IPv6 only VPSes are becoming popular right now, since some providers are now requiring you to pay to have an IPv4 address because of the IPv4 address exhaustion. But what if you need to connect to IPv4 only servers on your VPS? And also, what if you wanted to connect to your IPv6 only VPS on your IPv4 only device? Cloudflare WARP and Zero Trust has got you covered.
Note that this will only allow you to connect to your VPS using IPv4 if your client is connected to Cloudflare Zero Trust since Cloudflare WARP only provides a single NATed IPv4, not a public IPv6 address.
Cloudflare Zero Trust via WARP Connector (Recommended for those who have Cloudflare account)
Follow this tutorial in order to get the WireGuard configuration for the Cloudflare WARP Connector.
Cloudflare WARP free (For those who don’t have Cloudflare account)
Generate Cloudflare WARP account
- Download wgcf.
- Register new account.
wgcf register
- Generate WireGuard profile.
wgcf generate
Now you will have wgcf-profile.conf like this:
|
|
Setup Cloudflare WARP WireGuard on your VPS
This assumes that you have Debian installed on your VPS.
- Install WireGuard.
sudo apt install wireguard
- Create WireGuard configuration.
sudo nano /etc/wireguard/wg0.conf
Paste this WireGuard configuration and edit.
|
|
- Create a new WireGuard interface configuration.
sudo nano /etc/network/interfaces.d/wg0
Paste this WireGuard interface configuration and edit.
|
|
- Enable the WireGuard interface.
sudo ifup wg0
- Check if WireGuard is working.
sudo wg
Testing
- Try to ping and access an IPv4 only server on your VPS.
- Try to ping and access your VPS via its IPv4 address on a device with Cloudflare WARP running.