Skip to main content
Gouhith_Agraharam
Staff
Staff
Sep 4, 2023 2:51 PM UTC

Technical Tip: Disabling IPv6 on the FortiGate using the CLI

  • Apr 16, 2026 12:10 PM UTC
  • 0 replies
  • 25534 views
  • Translate All
Description This article describes how to disable IPv6 on the FortiGate using the CLI.
Scope FortiGate.
Solution

By default, the FortiGate generally has little to no pre-existing IPv6 configuration, but it may still be necessary to outright disable it where the option exists (e.g. to meet business or regulatory requirements). Consider implementing the following changes to disable IPv6 functionality or reduce its presence on the FortiGate:

 

To enable/disable IPv6 visibility in the FortiGate GUI, navigate to System -> Feature Visibility (in the Global VDOM, if using VDOMs) and toggle the IPv6 option. This can also be done in the CLI by changing the gui-ipv6 option under config system global:

 

GUI:

 

Feature_Visibility.png

 

CLI:

 

config system global

    set gui-ipv6 disable

end

 

To remove IPv6 unicast addresses assigned to the FortiGate's interfaces, navigate to config system interface and modify each interface to remove all IPv6 related configurations. Administrators can also use the purge command in some of the IPv6 config sub-sections to clear the configuration more quickly:

 

config system interface

    edit <name>

        config ipv6

            unset ip6-address
            unset ip6-allowaccess

            unset ip6-send-adv
            unset ip6-manage-flag
            unset ip6-other-flag

            config ip6-extra-addr

                purge

            config ip6-prefix-list

                purge

            end

        end

    next

end

 

Note: FortiGates with kernel 4.x (such as NP7-based FortiGates and FortiGate-VMs) may still auto-assign IPv6 link-local addresses on interfaces, even when no IPv6 unicast addresses have been assigned. This is expected behavior.

 

To disable IPv6 under Explicit Web-Proxy, navigate to Network -> Explicit Proxy and then disable the IPv6 Explicit Proxy toggle under Explicit Web Proxy, or navigate to config web-proxy explicit and disable ipv6-status in the CLI:

 

config web-proxy explicit

    set ipv6-status disable

end


To disable IPv6 support for SSL VPN Tunnel Mode, run the following command in the CLI (note that SSL VPN has been removed as of FortiOS 7.6.3 and later, see: SSL VPN tunnel mode replaced with IPsec VPN).

 

config vpn ssl web portal

    edit <portal-name>

        set ipv6-tunnel-mode disable

    next

end

 

To further block/drop incoming IPv6 packets destined for the FortiGate, it is possible to add a Local-In Policy that denies all IPv6 traffic coming to the FortiGate on any interface. This can be useful as an additional precaution to ensure that all IPv6 traffic destined for the FortiGate is ignored, even if an IPv6 address is associated with the FortiGate's interfaces (default action is deny). Note that user traffic not destined for the FortiGate itself (i.e., 'through' traffic) is governed by Firewall Policies and will be implicit-denied if no Firewall Policy exists to allow it.

 

config firewall local-in-policy6
    edit 1
        set intf "any"
        set srcaddr "all"
        set dstaddr "all"

        set service "ALL"
        set schedule "always"
    next
end

 

Related documents:

Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024