Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
VGSources
Blog

How to Disable IPv6 on Ubuntu (Temporarily, Permanently, or Per Connection)

Use sysctl for an immediate host-wide test, save it for persistence, use GRUB for a boot-time kernel disable, or set NetworkManager's IPv6 method to disabled for one connection. Learn the renderer caveats, verification commands, and rollback steps.
Length9 min Posted Quest giverVGSources Team

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To disable IPv6 on Ubuntu, first choose the scope you actually need. Use sysctl for an immediate, host-wide change without rebooting; save those settings in /etc/sysctl.conf or /etc/sysctl.d/ to make them persistent. Add ipv6.disable=1 to GRUB when IPv6 must be disabled during every boot. If only one NetworkManager profile should avoid IPv6, set that profile’s ipv6.method to disabled.

These methods are not interchangeable. A GRUB parameter affects the whole kernel and requires a reboot, while a NetworkManager setting affects one connection profile. Netplan behaves differently depending on whether it renders configuration for networkd or NetworkManager, and turning off DHCPv6 alone does not turn off every IPv6 function.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose the right IPv6-disable method

Ubuntu installations commonly combine a kernel networking stack with either NetworkManager or Netplan-rendered networkd. Decide whether you need a test, a persistent host policy, a boot-time kernel disable, or a single-profile change before editing anything.

Method Scope When it takes effect Survives reboot? Best use Rollback
Runtime sysctl Host-wide running system Immediately No Testing or a temporary diagnostic Set the same flags to 0
Persistent sysctl Host-wide After reload, and on future boots Yes A persistent policy while retaining normal boot Remove the entries or change them to 0, then reload
GRUB ipv6.disable=1 Entire kernel At boot Yes A broad disable before network services start Remove the parameter, run update-grub, reboot
NetworkManager profile One saved connection When the profile is reactivated Yes for that profile A wired, Wi-Fi, VPN, or other profile that must not use IPv6 Set ipv6.method back to auto or the required method
Netplan options Interfaces described by a Netplan file When Netplan is applied Yes while the file remains authoritative Controlling DHCPv6 and link-local behavior Restore the previous YAML and apply it

The Ubuntu Community Hub procedure documented for Ubuntu 22.04 and 24.04 uses the three sysctl flags shown below. Canonical’s Netplan documentation identifies networkd as Ubuntu Core’s default renderer, while Netplan can also render through NetworkManager. Confirm the Ubuntu release and renderer on the machine before choosing a persistent recipe.

#1 Best Overall
Sale
TP-Link AX1800 WiFi 6 Router (Archer AX21 V5) | Dual Band Wireless Internet, Gigabit, Easy Mesh, Works with Alexa - A Certified for Humans Device
  • DUAL-BAND WIFI 6 ROUTER: Wi-Fi 6(802.11ax) technology achieves faster speeds, greater capacity and reduced network congestion compared to the previous gen. All WiFi routers require a separate modem. Dual-Band WiFi routers do not support the 6 GHz band.
  • AX1800: Enjoy smoother and more stable streaming, gaming, downloading with 1.8 Gbps total bandwidth (up to 1200 Mbps on 5 GHz and up to 574 Mbps on 2.4 GHz). Performance varies by conditions, distance to devices, and obstacles such as walls.
  • CONNECT MORE DEVICES: Wi-Fi 6 technology communicates more data to more devices simultaneously using revolutionary OFDMA technology
  • EXTENSIVE COVERAGE: Achieve the strong, reliable WiFi coverage with Archer AX1800 as it focuses signal strength to your devices far away using Beamforming technology, 4 high-gain antennas and an advanced front-end module (FEM) chipset
  • OUR CYBERSECURITY COMMITMENT: TP-Link is a signatory of the U.S. Cybersecurity and Infrastructure Security Agency’s (CISA) Secure-by-Design pledge. This device is designed, built, and maintained, with advanced security as a core requirement.

Disable IPv6 immediately with sysctl

A runtime sysctl change affects the running kernel and does not require a reboot. It is the quickest way to determine whether IPv6 is related to a connectivity or application problem. It is host-wide, so every interface and service using the kernel networking stack is affected.

Apply the temporary setting

  1. Open a terminal or an administrative shell.
  2. Run all three settings, including the loopback setting:
sudo sysctl --write net.ipv6.conf.all.disable_ipv6=1
sudo sysctl --write net.ipv6.conf.default.disable_ipv6=1
sudo sysctl --write net.ipv6.conf.lo.disable_ipv6=1

all changes the system-wide setting, default supplies the setting used for interfaces created later, and lo covers the loopback interface. Running only one line can leave another path able to expose IPv6 configuration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check the result

List addresses and look for remaining IPv6 entries:

ip a

Inspect the kernel value directly when you need an unambiguous check:

cat /proc/sys/net/ipv6/conf/all/disable_ipv6
cat /proc/sys/net/ipv6/conf/default/disable_ipv6
cat /proc/sys/net/ipv6/conf/lo/disable_ipv6

A value of 1 indicates that the corresponding disable flag is set. The ip a output is useful for confirming what each interface currently advertises; the /proc/sys files confirm the kernel settings themselves.

Undo a temporary change

Set each flag back to 0:

sudo sysctl --write net.ipv6.conf.all.disable_ipv6=0
sudo sysctl --write net.ipv6.conf.default.disable_ipv6=0
sudo sysctl --write net.ipv6.conf.lo.disable_ipv6=0

Check ip a again after restoring the values. Interfaces or services that were disconnected while testing may need to reconnect through their normal network manager.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Make the sysctl disable persistent

A runtime value is not a configuration policy: it can disappear at the next boot. To keep the host-wide setting, place the same three flags in /etc/sysctl.conf or in a dedicated file under /etc/sysctl.d/.

Rank #2
Sale
TP-Link AC1200 WiFi Router Dual Band Wireless Internet Router (Archer A54) | 4 x 10/100 Mbps Fast Ethernet Ports, EasyMesh Compatible, Support Guest WiFi, Access Point Mode, IPv6 & Parental Controls
  • Dual-band Wi-Fi with 5 GHz speeds up to 867 Mbps and 2.4 GHz speeds up to 300 Mbps, delivering 1200 Mbps of total bandwidth¹. Dual-band routers do not support 6 GHz. Performance varies by conditions, distance to devices, and obstacles such as walls.
  • Covers up to 1,000 sq. ft. with four external antennas for stable wireless connections and optimal coverage.
  • Supports IGMP Proxy/Snooping, Bridge and Tag VLAN to optimize IPTV streaming
  • Access Point Mode - Supports AP Mode to transform your wired connection into wireless network, an ideal wireless router for home
  • Advanced Security with WPA3 - The latest Wi-Fi security protocol, WPA3, brings new capabilities to improve cybersecurity in personal networks

Option A: edit /etc/sysctl.conf

  1. Open the file with administrative privileges, for example:
sudo editor /etc/sysctl.conf
  1. Add these lines once, without changing their names:
net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6=1
net.ipv6.conf.lo.disable_ipv6=1
  1. Save the file and reload it:
sudo sysctl -p

The reload applies the values to the current session; the file supplies them again on subsequent boots.

Option B: use a dedicated drop-in file

A file in /etc/sysctl.d/ keeps the local policy separate from the main configuration. Create a clearly named file such as /etc/sysctl.d/99-disable-ipv6.conf, add the same three lines, and load the sysctl configuration with the system’s applicable reload command:

sudo editor /etc/sysctl.d/99-disable-ipv6.conf
sudo sysctl --system

After either option, verify both the values under /proc/sys/net/ipv6/conf/ and the addresses shown by ip a. If another configuration file defines the same key later in the load order, the later value can win; search the sysctl configuration files when the result does not match the line you added.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Remove the persistent policy

Delete the three entries, or change their values to 0, in whichever file you used. Reload with sudo sysctl -p for /etc/sysctl.conf or the applicable system-wide reload command for a drop-in. Confirm that the values are 0 and that normal IPv6 addresses return when the interface reconnects.

Disable IPv6 at boot with GRUB

The kernel parameter ipv6.disable=1 is a broad boot-time switch. It prevents IPv6 from being enabled by the kernel for that boot, rather than waiting for userspace network configuration. It is appropriate when every interface and service must start with IPv6 disabled, but it requires editing the boot configuration and rebooting.

Add the kernel parameter

  1. Open the GRUB defaults file:
sudo editor /etc/default/grub
  1. Find GRUB_CMDLINE_LINUX_DEFAULT and append ipv6.disable=1 inside its existing quotation marks. For example, preserve existing options and add the new one:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash ipv6.disable=1"

Do not remove options you still need. If the file has a different existing command-line value, append the parameter to that value instead of replacing it.

  1. Regenerate the boot menu:
sudo update-grub
  1. Reboot to load the new kernel command line:
sudo reboot

Schedule this change for a maintenance window when working over SSH or on a remote machine: the reboot interrupts the session, and an incorrect GRUB edit can affect boot.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
NETGEAR Nighthawk WiFi 6 Router R6700AX, Up to 1,500 sq ft, 1.8 Gbps | Reliable Performance, Easy Set Up, 20 devices, 4× Gigabit Port, Dual Band, AX1800
  • NIGHTHAWK WIFI 6 ROUTER FOR YOUR WHOLE HOME: Delivers fast, reliable WiFi across every room of your apartment or small home for streaming, gaming, video calls, and smart home devices, all running at the same time without slowing each other down.
  • WORKS WITH YOUR EXISTING INTERNET SERVICE: Pairs with your existing modem or gateway via ethernet. Compatible with most cable, fiber, DSL, and satellite providers. Some gateways and modem router combos may require bridge mode. No coax needed.
  • SET UP AND MANAGE YOUR NETWORK WITH THE NIGHTHAWK APP: Download the free Nighthawk app on iOS or Android for guided setup. Manage WiFi, run speed tests, pause devices, and set up guest networks from anywhere. Active internet required.
  • READY FOR THE DEVICES YOU ALREADY OWN: Your phones, laptops, and TVs work right out of the box. WiFi 6 delivers speeds up to 1.8 Gbps across 2.4 GHz and 5 GHz bands. Backward compatible with WiFi 5 and earlier.
  • COVERAGE IN EVERY ROOM: Covers up to 1,500 sq. ft. for up to 20 connected devices. Walls, floors, and interference can reduce range. Larger or multi-story homes may benefit from a NETGEAR Orbi mesh WiFi system.

Verify the boot-time setting

After the machine returns, run ip a and inspect the sysctl values under /proc/sys/net/ipv6/conf/. The verification must happen after the reboot; changing /etc/default/grub alone does not alter the currently running kernel.

Undo the GRUB disable

  1. Open /etc/default/grub and remove only ipv6.disable=1.
  2. Run sudo update-grub again.
  3. Reboot.

Once the system is back up, verify the interfaces and applications that require IPv6.

Disable IPv6 for one NetworkManager connection

NetworkManager’s ipv6.method property includes auto, dhcp, manual, disabled, ignore, and shared. Setting it to disabled changes one saved connection profile, not the entire host. Other profiles can continue using IPv6.

Find the exact profile name

List saved profiles:

nmcli connection show

Use the profile name from the NAME column. Names can contain spaces, so quote the name in subsequent commands.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set IPv6 to disabled and reactivate the profile

  1. Modify the profile:
sudo nmcli connection modify "PROFILE NAME" ipv6.method disabled
  1. Reactivate it so the new setting is used:
sudo nmcli connection down "PROFILE NAME"
sudo nmcli connection up "PROFILE NAME"

Disconnecting a remote connection can terminate your shell. Use local access or a second management path when changing the profile that carries your SSH session.

Verify the profile setting

Display the profile’s IPv6 method:

nmcli connection show "PROFILE NAME" ipv6.method

Then inspect the active addresses with ip a. The profile setting persists in NetworkManager’s connection data, so it is reapplied whenever that profile is activated. It does not alter a different Wi-Fi network, wired profile, VPN profile, or interface that has its own connection definition.

Restore IPv6 for the profile

Set the method back to the mode the connection requires, commonly automatic configuration:

Rank #4
LNN-AX3000 WiFi 6 Router, No App Required
  • AX3000 WiFi 6 Router for Home Internet: Enjoy AX3000-class WiFi 6 performance with up to 2402Mbps on 5GHz and 574Mbps on 2.4GHz. This dual-band wireless internet router is designed for everyday home use and generally covers your regular needs — streaming 4K video, browsing, video calls, online classes, and smart home devices.
  • Visit lnnnetlink.net for Easy 5-Step Setup — No App Required Just follow these 5 steps: Step 1: Connect the power adapter to the DC-IN jack on the back of the router. Step 2: Use an Ethernet cable to connect your modem / wall port to the WAN port (blue) on the router. Step 3: On your phone, tablet, or computer, join the default WiFi network — LNN788_2.4G_05EA or LNN788_5G_05EA (no password required). Step 4: Open any web browser and type lnnnetlink.net in the address bar. Step 5: Follow the on-screen instructions to customize your WiFi name and password — setup complete. (Designed for users who prefer quick browser-based setup without installing extra apps.)
  • Everyday Multi-Room WiFi Coverage: Five external antennas and Beamforming help support stable WiFi in common home areas such as living rooms, bedrooms, home offices, apartments, and rental homes. Actual coverage may vary depending on walls, distance, home layout, and wireless interference.
  • WPA3 Security with Useful Home Controls: WPA3 security helps protect your wireless network. Parental controls, guest network, and QoS let you manage connected devices, create a separate WiFi network for visitors, and help prioritize important devices during everyday internet use.
  • 20+ Devices, 1 WAN + 3 LAN Gigabit Ports & EasyMesh Support: OFDMA + MU-MIMO keeps 20+ devices running smoothly — phones, laptops, tablets, smart TVs, cameras, and more. The back panel has 1 Gigabit WAN + 3 Gigabit LAN ports for stable high-speed wired connections to PCs and smart TVs. For wider coverage, EasyMesh lets you add compatible routers to build a seamless whole-home mesh — you'll need at least 2 units (this router plus one or more). If a room has weak signal or is blocked by walls, simply place an extra compatible router there and press the Mesh button on the router to extend your network quickly.
sudo nmcli connection modify "PROFILE NAME" ipv6.method auto
sudo nmcli connection down "PROFILE NAME"
sudo nmcli connection up "PROFILE NAME"

If the profile previously used manual, dhcp, shared, or another method, restore that original value rather than assuming auto is correct.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What Netplan can and cannot disable

Netplan is a configuration layer, not a single networking daemon. Its renderer determines whether generated configuration is handed to networkd or NetworkManager. Canonical documentation states: “Ubuntu Core’s default Netplan configuration defers networking to networkd.” Other Ubuntu installations can explicitly use NetworkManager.

Identify the renderer and the authoritative file

Inspect the YAML files under /etc/netplan/ and look for a top-level renderer: value. A value of networkd means Netplan generates configuration for systemd-networkd; NetworkManager means the generated settings are consumed by NetworkManager. If no renderer is specified, the distribution’s default applies, so check the Ubuntu edition and its documentation before making a persistent change.

Disable DHCPv6 without claiming to disable IPv6

For an interface managed by Netplan, dhcp6: false stops DHCPv6 address configuration for that interface. It does not necessarily stop router advertisements, static IPv6 addresses, link-local IPv6, or other IPv6 behavior. Treat it as a DHCPv6 choice, not as an equivalent to ipv6.disable=1 or NetworkManager’s ipv6.method disabled.

A minimal illustrative section can look like this, with the real interface name and existing options retained:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
network:
  version: 2
  ethernets:
    enp1s0:
      dhcp6: false

Apply Netplan using the workflow appropriate to your installation after checking the YAML carefully. A syntax or indentation error can prevent the intended network configuration from being generated.

Understand link-local: [ ]

Netplan documents link-local: [ ] as disabling link-local addresses. This is broader than merely declining DHCPv6 and can affect link-local behavior for the interface; it is not a complete protocol-wide IPv6 switch. Use it only when you specifically need to suppress link-local address assignment and understand the effect on the interface.

Best Value
Sale
TP-Link Dual-Band AX3000 Wi-Fi 6 Wireless Gigabit Internet Router for Home | EasyMesh, VPN Clients & Server, HomeShield, OFDMA, MU-MIMO, USB 3.0, Secure by Design - Archer AX55
  • Next-Gen Gigabit Wi-Fi 6 Speeds: 2402 Mbps on 5 GHz and 574 Mbps on 2.4 GHz bands ensure smoother streaming and faster downloads; support VPN server and VPN client¹
  • A More Responsive Experience: Enjoy smooth gaming, video streaming, and live feeds simultaneously. OFDMA makes your Wi-Fi stronger by allowing multiple clients to share one band at the same time, cutting latency and jitter.²
  • Expanded Wi-Fi Coverage: 4 high-gain external antennas and Beamforming technology combine to extend strong, reliable, Wi-Fi throughout your home.
  • Improved Battery Life: Target Wake Time helps your devices to communicate efficiently while consuming less power.
  • Improved Cooling Design: No heat ups, no throttles. A larger heat sink and redefined case design cools the WiFi 6 system and enables your network to stay at top speeds in more versatile environments.

If the requirement is “no IPv6 on this host,” use the sysctl or GRUB approach. If the requirement is “this one NetworkManager profile must not use IPv6,” set that profile’s ipv6.method to disabled. Netplan’s DHCP and link-local controls should not be presented as substitutes for either scope.

Verification checklist after any method

  • Run ip a and inspect each relevant interface for inet6 addresses.
  • For sysctl changes, read the relevant files in /proc/sys/net/ipv6/conf/ and confirm the intended values.
  • For NetworkManager, display the profile with nmcli connection show, check ipv6.method, and reactivate the profile if it was not reconnected.
  • For GRUB, verify only after rebooting; editing the defaults file and running no reboot does not change the current kernel.
  • Test the application or route that motivated the change, because removing an address does not by itself prove that every service has adopted the new configuration.

Troubleshooting common results

IPv6 addresses remain after a sysctl command

Confirm that all three flags were set, not just all. Check the values under /proc/sys/net/ipv6/conf/, then reconnect the affected interface or restart the relevant network service if it retained an old profile state. If the values return to 0 after a restart, the change was runtime-only or another persistent configuration is overriding it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The setting disappears after reboot

Runtime commands are intentionally temporary. Put the flags in /etc/sysctl.conf or an appropriate /etc/sysctl.d/ file and reload them. If you intended a kernel-level policy, use the GRUB parameter and rebuild the menu with sudo update-grub before rebooting.

One connection still has IPv6 while another does not

That is expected when using NetworkManager profiles. Check each profile separately with nmcli connection show; changing one profile does not change the others. Apply ipv6.method disabled to every profile that must avoid IPv6, or use a host-wide sysctl or GRUB method when the policy is global.

Netplan changes do not produce the expected result

Check the renderer and the specific YAML file that owns the interface. dhcp6: false only controls DHCPv6, while link-local, router-advertised, static, or kernel-level IPv6 behavior may remain. If the requirement is complete IPv6 suppression, move to the method whose scope matches that requirement instead of stacking unrelated Netplan options.

A remote session drops during the change

NetworkManager profile reactivation and rebooting through GRUB both interrupt connectivity. Use local console access, an out-of-band console, or a second connection before applying a change to the interface carrying your administrative session. Keep the rollback command or edited line available before disconnecting.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Which approach should you use?

  • Testing a suspected IPv6 issue now: run the three runtime sysctl commands, verify with ip a, and restore the values when finished.
  • Keeping IPv6 off across normal reboots: save the three flags in sysctl configuration and reload them.
  • Preventing IPv6 from starting at all: add ipv6.disable=1 to GRUB, run sudo update-grub, and reboot.
  • Restricting only one saved connection: set that NetworkManager profile to ipv6.method disabled and reactivate it.
  • Controlling DHCPv6 or link-local behavior on a Netplan interface: edit the authoritative Netplan YAML, but do not describe those options as a complete IPv6 disable.

Keep a record of the original profile method, sysctl file, or GRUB command line. That makes rollback precise and prevents a temporary diagnostic setting from becoming an unexplained permanent networking change.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.