How to Disable IPv6 on Linux

Want to know how to disable IPV6 on Linux? Here is a easy guide for you to disable IPv6 on linux.

Written By Lorenzo Vincent

Updated at October 2nd, 2025

If you’re experiencing issues with IPv6 traffic over VPN, you can disable IPv6 for a specific connection in Ubuntu (or other Linux distros using NetworkManager). This ensures the change applies only to that connection, without affecting others.


1. List all NetworkManager connections

Run the following command:

nmcli connection show

Look for the profile name that corresponds to WiFi (e.g., MyWiFi).
 

2. Disable IPv6 for that specific connection

Replace  with the actual profile name from the list:

nmcli connection modify "MyWiFi" ipv6.method ignore 
 

3. Restart the connection to apply changes

nmcli connection down "MyWiFi" && nmcli connection up "MyWiFi" 

This deactivates and reactivates the connection so the new setting takes effect immediately.


4. Verify IPv6 is off

Run the command below:

nmcli connection show "MyWiFi" | grep ipv6.method

Expected output:

 
ipv6.method: ignore 

This confirms IPv6 has been disabled for the selected connection.