Fix OpenVPN IPv6 Leak on Ubuntu

From Drake Panzer
Revision as of 11:58, 19 October 2020 by Drakepanzer (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

If your Ubuntu OpenVPN client has an IPv6 and an IPv4 address, the IPv6 address may be leaking. Visit this site,, and check if your IPv6 address exists.

If your IPv6 address shows up then there are two ways to hide it:

  1. Disable IPv6 on your client.
  2. Configure OpenVPN server to support IPv6 and IPv4.

I'd just disable IPv6 on your client and call it a day.

Disable IPv6 on Your Ubuntu OpenVPN Client

You need to disable IPv6 on your Ubuntu machine.

You can run this command:

sudo sh -c "echo 'net.ipv6.conf.all.disable_ipv6=1\nnet.ipv6.conf.default.disable_ipv6=1\nnet.ipv6.conf.lo.disable_ipv6=1' >> /etc/sysctl.conf"

or append this to /etc/sysctl.conf:


Once you've done one of the two methods, run this command to update sysctl: sudo sysctl -p

Then disable ipv6 in the Ubuntu network settings, just to be safe.

Check that it worked here: You should only see your IPv4 address and your IPv6 address should not exist.