I’m creating a server with OpenVPN to mask my IP address using this [article](https://www.digitalocean.com/community/tutorials/how-to-set-up-and-configure-an-openvpn-server-on -ubuntu-20-04-en) from DigitalOcean.
The setup worked perfectly when I configure Redirect All Traffic Through the VPN, all my accesses on sites with IPv4 display the Droplet’s IP.
The problem occurs when I access sites that accept IPv6, in these cases the displayed address is that of my ISP.
Below the line
net.ipv4.ip_forward = 1
I added the value
net.ipv6.conf.all.forwarding = 1
but nothing happened.
How do I also enable the use of the Droplet’s IPv6?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello,
In order to enable the use of the Droplet’s IPv6 with OpenVPN, you need to configure your OpenVPN server to handle IPv6 traffic. Here are the steps:
Add an IPv6 block for your Droplet through the DigitalOcean Control Panel if you haven’t done it already.
Update /etc/openvpn/server/server.conf by adding the following lines:
server-ipv6 2001:db8:123::/64
Note: Replace 2001:db8:123::/64 with your own IPv6 block.
Ensure that your OpenVPN server is started with the server-ipv6 flag.
Update your OpenVPN client configuration file to include the following lines:
tun-ipv6 route-ipv6 2000::/3
Please restart your OpenVPN server and client after making these changes.
For more information on working with IPv6, refer to the DigitalOcean IPv6 documentation.
Hope that this helps!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.