This short article explains how to disable IPv6 on Mac and presents alternative solutions for the case when the turn off IPv6 option is not available.
The simplest way to disable the IPv6 is to turn off the IPv6 option from your Network settings. However, sometimes the option is not available, and you have to disable IPv6 via Terminal commands.
Disable IPv6 on macOS [Summary]
- If the IPv6 turn off option is available (more details with pictures here):
- Open System Preferences > Network.
- Select the active network adapter (Wi-Fi or Ethernet ) from the left panel.
- Click on the Advanced button from the right panel.
- Next, click on the TCP/IP tab.
- Select the Configure IPv6 drop-down menu and set it to Off.
- Click the OK button.
- Restart your Mac to make sure the IPv6 is disabled.
- If the IPv6 turn off option is NOT available:
- Open the Terminal app and disable IPv6 from the command line.
- Alternative solution: disable IPv6 on your router.
What is IPv6 and why disable IPv6?
The Internet Protocol Version 6 (IPv6) was designed to replace IPv4 to allow more unique IP address identifiers to be created. This was necessary as the available IPv4 addresses were running out.
However, the complete transition to IPv6 addresses is far from complete. Thus, many Internet services (data centers, Internet Service Providers) still use IPv4 and do not assign public IPv6 addresses. Consequently, most VPN services do not support IPv6 VPN tunnels.
The problem is that, if your network supports IPv6 and the VPN server you are connected to works over IPv4, then your IPv6 traffic may leak.
Top VPN providers offer IPv6 leak protection implemented in their applications, but it is safer to disable IPv6 from your machine. Disabling IPv6 at the system level guarantees no leaks are possible.
For your own safety, we recommend that you disable the IPv6 any time you set up a manual VPN connection on your Mac, no matter the chosen VPN protocol (IKEv2, L2TP over IPSec, OpenVPN).
Important! As IPv4 is still the primary Internet Protocol in use, you can turn off IPv6 without any negative consequences to your browsing activities.
How to check if IPv6 is enabled?
Whether you have IPv6 capability depends on your ISP and the device you are using.
To check your IPv6 settings, you may visit an IP address locator website like IPleak.net. It is important to load IPleak while you are not connected to a VPN.

In case you don’t see an IPv6 address, then you may not need to disable it. However, you may still proceed if you regularly connect to public WiFi networks. It is safer to have IPv6 turned off while using unsecured hotspots.
If you see the IPv6 address, then you may proceed with the steps described below.
How to disable IPv6 on Mac?
Disabling IPv6 on a Mac computer is not difficult. However, in case the turn off the option is not accessible for your active network, then you need to roll up your sleeves and run some commands in your Terminal.
Disable IPv6 from Network settings
The simplest method to disable IPv6 on macOS (Catalina, Mojave, High Sierra, Sierra, and below) is to turn off IPv6 from the Network settings (if the option is available):
- Click on the Apple icon in the top left corner of your screen.
- Open System Preferences > Network.
- Select the network that you are already using.
Note: If you are connected to the internet wirelessly, the active adapter will be Wi-Fi. However, if you are connected via a LAN cable, the corresponding adapter will be Ethernet. - Click on the Advanced button.
- Next, click on the TCP/IP tab.
- Select the Configure IPv6 drop-down menu and set it to Off. In case the Off option is not available, then proceed with the command line alternative described below.
- Click the OK button.
- Restart your Mac to make sure the IPv6 is disabled. You may double-check by loading the IPleak.net website.
To restore IPv6, follow the steps described above and select Automatically in the Configure IPv6 drop-down.
Disable IPv6 from the command line
You may not have the turn off IPv6 option available. In this case, you need to run a command through the Terminal app:
- Open Launchpad.
- Search for Terminal.
- Click on the Terminal.app.
- If your active network is WiFi enter the following command:
networksetup -setv6off Wi-Fi
- If you are on Ethernet:
networksetup -setv6off Ethernet
- You may combine both of commands to disable IPv6 on WiFi and Ethernet at the same time:
networksetup -setv6off Ethernet && networksetup -setv6off Wi-Fi
- To re-enable IPv6, you need to replace setv6off to setv6automatic (the default state in macOS), for example:
networksetup -setv6automatic Wi-Fi && networksetup -setv6automatic Ethernet
The Terminal app when you type in the command to disable IPv6 over Wi-Fi:

Alternative solution: disable IPv6 on your router
An option that you may consider if you want to disable IPv6 on all your devices at once is to turn it off from your router. Of course, you need to remember that IPv6 is still enabled on your Mac, and if you connect to the Internet using another Wi-Fi network, you are still exposed to IP leaks.
There are many types of router brands on the market, and the admin panels are quite different. Basically, you need to look for the IPv6 management options and disable IPv6. For example, for some DD-WRT routers, it goes like this:
- Go to Administration > Management.
- Under IPv6 Support, set IPv6 to Disable.
- Click Save, and then, Apply Settings.
Summary
Disabling IPv6 on macOS is recommended while connected to a VPN. Thus, you make sure your IPv6 address is not exposed.
To disable IPv6 on Mac, you can either turn it off from the Network settings, run commands on the Terminal application, or disable IPv6 from the router.
Make sure you subscribe to our newsletter (below) to get other need-to-know VPN tips! Also, you would make a Transylvanian baby-bat 🦇happy.
Thanks! I just forgot about the possibility to use the Terminal 😀 Save my day! Cheers!
Hi – please help. Keeps saying
Error: The parameters were not valid.
Cheers
Hi. What command have you executed?
The WiFi comando is working but the Ethernet commando says: Ethernet is not a recognized network service. ** Error: The parameters were not valid. This is on Catalina 10.15.4.
Hi, Brian. Do you connect to the Internet using an Ethernet cable?
It may be useful if you run the command:
networksetup -listallhardwareports
to see the ports you are using on your Mac.
thanks for the article,
I have a question:
I am connected through a thunderbolt connecter, USB 10/100/1000 LAN
in that case what should be the command line to deactivate IPv6?
Check your devices
$networksetup -listallhardwareports
Replace Network or Wi-Fi for your Hardware Port Name.
Hello again,
When I run $networksetup -listallhardwareports command, I found on the top of list :
Hardware Port: USB 10/100/1000 LAN
Device: en7
However when I run this command:
networksetup -setv6off USB 10/100/1000 LAN
I receive this error:
USB is not a recognized network service.
** Error: The parameters were not valid.
I tried various alternatives such as USB or 10/100/1000 LAN separetly , I receive same error.
anyone can have an idea?
Same issue…
any way to turn off ipv6 with thunderbolt?
sudo networksetup -setv6off “Thunderbolt Bridge”
If you write
networksetup -setv6off “USB 10/100/1000 LAN”
it should work! At least it worked for me.
networksetup -setv6off ‘Thunderbolt Ethernet’
Thanks a lot!
it worked!
Or there is always the best step 0: Don’t disable IPv6; instead, make sure it is turned at on your router. Most ISPs *do* support IPv6 and nearly half the Internet’s traffic is IPv6. Google, Facebook, Microsoft, Apple all run IPv6; virtually all cable modem ISPs, 4g/5g wireless, fiber providers deliver IPv6. *Enterprises* are still lagging, but that is getting better (slowly).
You probably do need to run “dual stack” IPv6 for some time (though if you’re interested look into NAT64 as a transition technology), but there are significant security benefits to using IPv6 whenever possible. It is true that you can encounter some “split tunnel” kinds of issues with some corner case dual stack/VPN scenarios, but with so many VPN providers supporting IPv6 natively, the guidance to to disable IPv6 is largely anachronistic.
I’m still having problems; -listallhardwareports shows my hard-wired ethernet port as “Ethernet 1”, but if I run networksetup -setv6off Ethernet 1, it still is not listed as a recognized network service. Changing the space to an underscore doesn’t help, nor does leaving the space out. Ideas??