OpenVPN on Linux: how to disable IPv6

In Linux, in Network Manager, when configuring an OpenVPN connection, I want to disable all use of IPv6 (have all access fail).

The choices under IPv6 tab’s “Method” pull-down are: Automatic, Automatic (Only Addresses), Automatic (Only DHCP), Link-Local, Manual, Ignored.

Which choice should I select ? Does “Ignored” mean “Disable IPv6” or “Let IPv6 go out without using VPN” ?

Thanks for any help.

Do you want to disable IPv6 system wide or just for that connection? The options you’re seeing are for that interface specifically. If you want to disable it system wide:

sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1

sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1

And if you want it to be permanent after reboots, also edit /etc/sysctl.conf with those two configuration entries.

Disable system-wide. Thanks for the info.

Okay, so “ignore” just means “don’t use this VPN connection”. It doesn’t stop IPv6 from going other ways. Thanks.

Yep.

FYI, you can also make the edits to sysctl.conf first, then do ‘sudo sysctl -p’ to bring the new settings into effect.

Thanks, will see how that goes.

But what is the answer to my original question ? If I wanted to disable IPv6 just for one VPN connection, which of those 6 choices would I pick ?

Link-local would mean you’ll get IPv6 on that interface, but not a publicly routable address that’s valid on the internet.

Manual would mean you have to configure any IPv6 settings you want in the boxes on that page.

Ignore means networkmanager won’t do anything with IPv6. You’d have to use a terminal to set an address if you wanted. But with IPv6 disabled in sysctl, you would just get an error if you tried.