How can I disable IPv6 with the “ip” command?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












I need to disable the usage/assignemnt of the IPv6, I tried creating the /etc/sysctl.d/40-ipv6.conf file and adding the relative settings, I've also tried editing the GRUB adding the following line:



GRUB_CMDLINE_LINUX="ipv6.disable_ipv6=1"


And after sudo update-grub and rebooting the system, IPv6 still be used by my eth card.



Is there permanent way I can disable IPv6 using the "ip" linux command?







share|improve this question
















  • 1




    Warning: Disabling IPv6 is not recommended. This will cause some services to fail and you to be unable to communicate with some Internet hosts.
    – Michael Hampton
    Apr 3 at 17:06










  • @MichaelHampton Good point..
    – Luigi T.
    Apr 3 at 17:24














up vote
2
down vote

favorite












I need to disable the usage/assignemnt of the IPv6, I tried creating the /etc/sysctl.d/40-ipv6.conf file and adding the relative settings, I've also tried editing the GRUB adding the following line:



GRUB_CMDLINE_LINUX="ipv6.disable_ipv6=1"


And after sudo update-grub and rebooting the system, IPv6 still be used by my eth card.



Is there permanent way I can disable IPv6 using the "ip" linux command?







share|improve this question
















  • 1




    Warning: Disabling IPv6 is not recommended. This will cause some services to fail and you to be unable to communicate with some Internet hosts.
    – Michael Hampton
    Apr 3 at 17:06










  • @MichaelHampton Good point..
    – Luigi T.
    Apr 3 at 17:24












up vote
2
down vote

favorite









up vote
2
down vote

favorite











I need to disable the usage/assignemnt of the IPv6, I tried creating the /etc/sysctl.d/40-ipv6.conf file and adding the relative settings, I've also tried editing the GRUB adding the following line:



GRUB_CMDLINE_LINUX="ipv6.disable_ipv6=1"


And after sudo update-grub and rebooting the system, IPv6 still be used by my eth card.



Is there permanent way I can disable IPv6 using the "ip" linux command?







share|improve this question












I need to disable the usage/assignemnt of the IPv6, I tried creating the /etc/sysctl.d/40-ipv6.conf file and adding the relative settings, I've also tried editing the GRUB adding the following line:



GRUB_CMDLINE_LINUX="ipv6.disable_ipv6=1"


And after sudo update-grub and rebooting the system, IPv6 still be used by my eth card.



Is there permanent way I can disable IPv6 using the "ip" linux command?









share|improve this question











share|improve this question




share|improve this question










asked Apr 3 at 15:22









Luigi T.

7310




7310







  • 1




    Warning: Disabling IPv6 is not recommended. This will cause some services to fail and you to be unable to communicate with some Internet hosts.
    – Michael Hampton
    Apr 3 at 17:06










  • @MichaelHampton Good point..
    – Luigi T.
    Apr 3 at 17:24












  • 1




    Warning: Disabling IPv6 is not recommended. This will cause some services to fail and you to be unable to communicate with some Internet hosts.
    – Michael Hampton
    Apr 3 at 17:06










  • @MichaelHampton Good point..
    – Luigi T.
    Apr 3 at 17:24







1




1




Warning: Disabling IPv6 is not recommended. This will cause some services to fail and you to be unable to communicate with some Internet hosts.
– Michael Hampton
Apr 3 at 17:06




Warning: Disabling IPv6 is not recommended. This will cause some services to fail and you to be unable to communicate with some Internet hosts.
– Michael Hampton
Apr 3 at 17:06












@MichaelHampton Good point..
– Luigi T.
Apr 3 at 17:24




@MichaelHampton Good point..
– Luigi T.
Apr 3 at 17:24










1 Answer
1






active

oldest

votes

















up vote
2
down vote



accepted










The following configuration lines belong in the file, /etc/sysctl.d/40-ipv6.conf to disable IPv6 on all interfaces.



net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1


Which Linux are we talking about? The GRUB configuration method looks something like the following configuration in, perhaps, /etc/default/grub.



GRUB_CMDLINE_LINUX="ipv6.disable=1 rhgb quiet"


After changing the GRUB configuration, one must reinstall GRUB and reboot.



grub2-mkconfig -o /boot/grub2/grub.cfg
shutdown -r now


Later, check to see that the configuration was successful.



ip addr show | grep net6


Or, to simply prevent the IPv6 module from binding to the IPv6 networking stack, add the line below to /etc/modprobe.d/blacklist.conf (or a different file name according to the existing directory/file structure):



options ipv6 disable=1


Then reboot.



This will allow the loading of the IPv6 module in order to satisfy any other modules that depend on it while disabling support for the IPv6 protocol.



In a RedHat-based OS, one could use the following directive in /etc/sysconfig/network.



NETWORKING_IPV6=no





share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );








     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f435308%2fhow-can-i-disable-ipv6-with-the-ip-command%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote



    accepted










    The following configuration lines belong in the file, /etc/sysctl.d/40-ipv6.conf to disable IPv6 on all interfaces.



    net.ipv6.conf.all.disable_ipv6 = 1
    net.ipv6.conf.default.disable_ipv6 = 1


    Which Linux are we talking about? The GRUB configuration method looks something like the following configuration in, perhaps, /etc/default/grub.



    GRUB_CMDLINE_LINUX="ipv6.disable=1 rhgb quiet"


    After changing the GRUB configuration, one must reinstall GRUB and reboot.



    grub2-mkconfig -o /boot/grub2/grub.cfg
    shutdown -r now


    Later, check to see that the configuration was successful.



    ip addr show | grep net6


    Or, to simply prevent the IPv6 module from binding to the IPv6 networking stack, add the line below to /etc/modprobe.d/blacklist.conf (or a different file name according to the existing directory/file structure):



    options ipv6 disable=1


    Then reboot.



    This will allow the loading of the IPv6 module in order to satisfy any other modules that depend on it while disabling support for the IPv6 protocol.



    In a RedHat-based OS, one could use the following directive in /etc/sysconfig/network.



    NETWORKING_IPV6=no





    share|improve this answer
























      up vote
      2
      down vote



      accepted










      The following configuration lines belong in the file, /etc/sysctl.d/40-ipv6.conf to disable IPv6 on all interfaces.



      net.ipv6.conf.all.disable_ipv6 = 1
      net.ipv6.conf.default.disable_ipv6 = 1


      Which Linux are we talking about? The GRUB configuration method looks something like the following configuration in, perhaps, /etc/default/grub.



      GRUB_CMDLINE_LINUX="ipv6.disable=1 rhgb quiet"


      After changing the GRUB configuration, one must reinstall GRUB and reboot.



      grub2-mkconfig -o /boot/grub2/grub.cfg
      shutdown -r now


      Later, check to see that the configuration was successful.



      ip addr show | grep net6


      Or, to simply prevent the IPv6 module from binding to the IPv6 networking stack, add the line below to /etc/modprobe.d/blacklist.conf (or a different file name according to the existing directory/file structure):



      options ipv6 disable=1


      Then reboot.



      This will allow the loading of the IPv6 module in order to satisfy any other modules that depend on it while disabling support for the IPv6 protocol.



      In a RedHat-based OS, one could use the following directive in /etc/sysconfig/network.



      NETWORKING_IPV6=no





      share|improve this answer






















        up vote
        2
        down vote



        accepted







        up vote
        2
        down vote



        accepted






        The following configuration lines belong in the file, /etc/sysctl.d/40-ipv6.conf to disable IPv6 on all interfaces.



        net.ipv6.conf.all.disable_ipv6 = 1
        net.ipv6.conf.default.disable_ipv6 = 1


        Which Linux are we talking about? The GRUB configuration method looks something like the following configuration in, perhaps, /etc/default/grub.



        GRUB_CMDLINE_LINUX="ipv6.disable=1 rhgb quiet"


        After changing the GRUB configuration, one must reinstall GRUB and reboot.



        grub2-mkconfig -o /boot/grub2/grub.cfg
        shutdown -r now


        Later, check to see that the configuration was successful.



        ip addr show | grep net6


        Or, to simply prevent the IPv6 module from binding to the IPv6 networking stack, add the line below to /etc/modprobe.d/blacklist.conf (or a different file name according to the existing directory/file structure):



        options ipv6 disable=1


        Then reboot.



        This will allow the loading of the IPv6 module in order to satisfy any other modules that depend on it while disabling support for the IPv6 protocol.



        In a RedHat-based OS, one could use the following directive in /etc/sysconfig/network.



        NETWORKING_IPV6=no





        share|improve this answer












        The following configuration lines belong in the file, /etc/sysctl.d/40-ipv6.conf to disable IPv6 on all interfaces.



        net.ipv6.conf.all.disable_ipv6 = 1
        net.ipv6.conf.default.disable_ipv6 = 1


        Which Linux are we talking about? The GRUB configuration method looks something like the following configuration in, perhaps, /etc/default/grub.



        GRUB_CMDLINE_LINUX="ipv6.disable=1 rhgb quiet"


        After changing the GRUB configuration, one must reinstall GRUB and reboot.



        grub2-mkconfig -o /boot/grub2/grub.cfg
        shutdown -r now


        Later, check to see that the configuration was successful.



        ip addr show | grep net6


        Or, to simply prevent the IPv6 module from binding to the IPv6 networking stack, add the line below to /etc/modprobe.d/blacklist.conf (or a different file name according to the existing directory/file structure):



        options ipv6 disable=1


        Then reboot.



        This will allow the loading of the IPv6 module in order to satisfy any other modules that depend on it while disabling support for the IPv6 protocol.



        In a RedHat-based OS, one could use the following directive in /etc/sysconfig/network.



        NETWORKING_IPV6=no






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Apr 3 at 15:37









        Christopher

        8,91022742




        8,91022742






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f435308%2fhow-can-i-disable-ipv6-with-the-ip-command%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            Peggy Mitchell

            Palaiologos

            The Forum (Inglewood, California)