Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»General Articles»How to Disable IPv6 on Linux

    How to Disable IPv6 on Linux

    By RahulJanuary 4, 20162 Mins Read

    IPv6 is the next-generation internet protocol, designed to replace the current Internet Protocol, IP Version 4. IP addresses are required for communication between two devices. It is an identity of a computer over Internet.

    Advertisement

    This article will help you to disable IPv6 from your Linux box.

    1. Check IPv6 Address

    Use ifconfig command to view current IPv6 address on your system. You will get results something like below.

    [[email protected] ~]# ifconfig 
    
    eth0: flags=4163  mtu 1500
            inet 45.55.65.94  netmask 255.255.224.0  broadcast 45.55.95.255
            inet6 fe80::601:92ff:fe35:ea01  prefixlen 64  scopeid 0x20<link>
            ether 04:01:92:35:ea:01  txqueuelen 1000  (Ethernet)
            RX packets 2411381  bytes 794420295 (757.6 MiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 2151232  bytes 351005391 (334.7 MiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    eth1: flags=4163  mtu 1500
            inet6 fe80::601:92ff:fe35:ea02  prefixlen 64  scopeid 0x20<link>
            ether 04:01:92:35:ea:02  txqueuelen 1000  (Ethernet)
            RX packets 8  bytes 648 (648.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 123828  bytes 21997128 (20.9 MiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    lo: flags=73  mtu 65536
            inet 127.0.0.1  netmask 255.0.0.0
            inet6 ::1  prefixlen 128  scopeid 0x10<host>
            loop  txqueuelen 0  (Local Loopback)
            RX packets 47584  bytes 4822673 (4.5 MiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 47584  bytes 4822673 (4.5 MiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    

    2. Disable IPv6 Temporarily

    If to disable IPv6 for your current session, Simply use following command to set run time variable. Remember that below change will be discards after system reboot.

    $ sudo echo "1" > /proc/sys/net/ipv6/conf/all/disable_ipv6
    

    3. Disable IPv6 Permanent

    To disable IPv6 permanently, edit /etc/sysctl.conf file and add/update following parameters

    $ vi /etc/sysctl.conf
    
    net.ipv6.conf.all.disable_ipv6 = 1
    net.ipv6.conf.default.disable_ipv6 = 1
    net.ipv6.conf.lo.disable_ipv6 = 1
    

    and reload sysctl configuration using following command

    $ sudo sysctl -p
    

    IPv6 networking
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    How to Split Large Archives in Linux using the Command Line

    System.out.println() Method in Java: A Beginner’s Guide

    sleep Command in Linux with Examples

    View 1 Comment

    1 Comment

    1. AJ on August 8, 2017 9:49 pm

      Hi,

      I am running fedora 26 vm, I am expecting my machine to have an ipv6 address but I don’t see that in `ip -6 addr`. What changes do I need to make to enable/accept ipv6 via dhcp client

      Reply

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • How to Split Large Archives in Linux using the Command Line
    • System.out.println() Method in Java: A Beginner’s Guide
    • Split Command in Linux With Examples (Split Large Files)
    • Test Your Internet Speed from the Linux Terminal
    • 11 Practical Example of cat Command in Linux
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.