How to Disable IPv6 in macOS using the networksetup Command

Why Disable IPv6 on a Mac?

IPv6 is the modern standard for internet routing, designed to replace the exhausted supply of IPv4 addresses. While macOS enables IPv6 by default for all network interfaces, it can sometimes cause severe routing conflicts, DNS resolution failures, or slow loading times on older corporate networks or VPNs that are not fully configured to support IPv6 traffic.

In older versions of macOS, you could easily turn off IPv6 by navigating to System Preferences, opening your Network adapter, clicking Advanced, and selecting “Off” from the Configure IPv6 dropdown. However, in modern versions of macOS (like Ventura and Sonoma), Apple completely removed the “Off” option from the System Settings GUI. You are only allowed to choose “Automatically” or “Manually.”

To completely disable the protocol and force your Mac to rely solely on IPv4, you must use the networksetup Terminal command.

Step 1: Identify Your Network Interface Name

Before you can disable IPv6, you need to know the exact name of the network interface you are currently using (e.g., Wi-Fi or Ethernet).

  1. Open the Terminal application (found in Applications > Utilities).
  2. Run the following command to list all available network services:
networksetup -listallnetworkservices

You will see a list of interfaces, such as Wi-Fi, Thunderbolt Ethernet, or USB 10/100/1000 LAN. Note the exact spelling and capitalization of your active connection.

Step 2: Disable IPv6 via Terminal

Once you have the interface name, you can issue the command to turn IPv6 off. Because this is a core network configuration change, you must run the command with administrative (sudo) privileges.

If you are connected via Wi-Fi, run the following command:

sudo networksetup -setv6off Wi-Fi

If you are connected via a wired Ethernet adapter, you must enclose the name in quotation marks because of the space in the name:

sudo networksetup -setv6off "Thunderbolt Ethernet"

Press Enter, type your Mac’s administrator password when prompted, and press Enter again.

Step 3: Verify the Changes

The network interface will briefly reset and IPv6 will be completely disabled. You can verify this by checking the status of the interface:

networksetup -getinfo Wi-Fi

Scroll through the output until you find the IPv6 section. It should now clearly state IPv6: Off.

How to Re-Enable IPv6

If you move to a different network or resolve your VPN routing issues and need to turn IPv6 back on, simply return to the Terminal and change the -setv6off flag to -setv6automatic.

sudo networksetup -setv6automatic Wi-Fi

Your Mac will instantly resume broadcasting and accepting IPv6 traffic.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.