This post is mainly a reminder for me in case I want to revert my changes or repeat them in case of a new Arch install. I needed to disable IPv6 to prevent leaks through my VPN.

The Arch Wiki entry for IPv6 has many options for disabling IPv6, and this is the one that worked for me:

Create a /etc/sysctl.d/40-ipv6.conf with these contents:

# Disable IPv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.enp1s0f0.disable_ipv6 = 1
net.ipv6.conf.wlp2s0b1.disable_ipv6 = 1

Then, through the NetworkManager GUI, open your connection’s settings, go to “IPv6 Settings”, and set Method to Ignore.