Turn Off IPv6 on a Network Service

Disable IPv6 on Wi-Fi or Ethernet with networksetup -setv6off when IPv6 causes connection problems.

macOSnetworknetworksetupipv6Medium risk
Run `networksetup -setv6off Wi-Fi` to switch IPv6 off for the Wi-Fi service.

01Command

Command
$ networksetup -setv6off Wi-Fi

02What it does

Some home routers, hotel networks, and older VPN clients misbehave when IPv6 is active, causing slow pages or failed captive-portal logins. Turning IPv6 off makes macOS use IPv4 only, which is a common everyday fix. Use -setv6automatic later to go back to the normal default; avoid -setv6linkmanual unless you know the exact settings.

03Risk

RiskMedium risk
RequirementsAdministrator access (macOS will prompt for your password)
!Warning: Some networks and services rely on IPv6; if a site stops working, turn IPv6 back on with the undo command.

04Undo

Undo
$ networksetup -setv6automatic Wi-Fi

05Sources

Last verified: 2026-09-18 · Category: Network