|

How to Disable IPv6 on Linux

IPv6 is enabled by default on most Linux distros. However, IPv6 is not used for some situations for most of time and it may cause troubles and requires effort to protect the network and ensure the security. This post introduces how to disable IPv6 support on Linux (newer modern Kernel versions).

First, add these lines to /etc/sysctl.conf:

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

IPv6 on Linux can be easily configured via sysctrl. To make it take effect, run as root:

sysctl -p

To verify, check the network interfaces whether IPv6 addresses disappear by ifconfig.

You may also check that the kernel variable contains 1:

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

The settings are in sysctl.conf and after restarts, Linux will load them and the settings will still take effect.

Similar Posts

  • How to convert tiff images from RGB color to CMYK color on Linux?

    I have a poster to be submitted to the publisher which requires image files in CMYK color. The file I already have is in RGB color. How to convert it on Linux? The convert tool from ImageMagick with option -colorspace to alternate image colorspace of images. The plain output with colorspace is quite large. So…

  • Fedora 中文字体设置

    Fedora 一直有中文字体难看的问题, 尤其是在英文环境中. 使用本文中的配置方法可以得到令人满意的中文效果. 此方案中使用字体都为开源且在Fedora源中自带. 此方案对 Fedora 9 – 20 有效. 对于后续版本支持我会确认并更新此文章. 此方案对Gnome, KDE都有效. Firefox 中也有中文难看的问题, 后面会提到. 快速配置方法 如果你想马上配置好,请使用如下命令。此方法测试使用效果良好。 # yum install cjkuni-ukai-fonts cjkuni-uming-fonts # wget https://raw.githubusercontent.com/zma/config_files/master/others/local.conf \ -O /etc/fonts/local.conf 相关英文字体配置可以参考:Improving Fedora Font Rendering with Open Software and Fonts Only. Fedora 系统中文字体的配置方案 使用uming和ukai字体,即AR PL UMing CN等. 中文字体和等宽字体效果如图所示(点击看大图, Firefox 中文字体设置在后面会提到). 方法如下: 安装字体 首先安装这两个字体: cjkuni-ukai-fonts cjkuni-uming-fonts (在Fedora…

2 Comments

  1. Nice try, but the correct config parameters are:

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

    between disable and ipv6 you have to paste an underscore

    1. Thanks for pointing this out. It is a formatting problem after the site changes to be using markdown. `_` is treated as a formatting character. It is fixed now.

Leave a Reply

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