博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
linux下面禁止ipv6的方法
阅读量:2229 次
发布时间:2019-05-09

本文共 1763 字,大约阅读时间需要 5 分钟。

Here's the summary of what I can think of, with alternate methods in case the first one doesn't work with you:

• Debian kernel 2.4:
  • In /etc/modutils, change the line
    alias net-pf-10 ipv6
    to
    alias net-pf-10 off

    alias ipv6 off
  • Reboot.
• Debian kernel 2.6/Ubuntu ("official" method)/Fedora Core (method 1):
  • In /etc/modprobe.d/aliases, change the line
    alias net-pf-10 ipv6
    to
    alias net-pf-10 off

    alias ipv6 off
  • Reboot.
• Debian kernel 2.6/Ubuntu (alternate method):
  • In /etc/modprobe.d/blacklist, add a line
    blacklist ipv6
  • Reboot.
• RHEL/CentOS:
  • In /etc/modprobe.conf, make sure you have
    alias net-pf-10 off

    alias ipv6 off
  • Reboot.
• RHEL/CentOS/Fedora Core (method 2)/Mandriva (method 1):
  • In /etc/sysconfig/network, add a line
    NETWORKING_IPV6="no"
  • Reboot.
• SuSE 9.0:
  • In /etc/modules.conf, change the line
    alias net-pf-10 ipv6
    to
    alias net-pf-10 off

    alias ipv6 off
  • Reboot.
• SuSE 9.1/9.2/9.3/10.0 ("official" method):
  • In /etc/modprobe.conf, change the line
    alias net-pf-10 ipv6
    to
    alias net-pf-10 ipv6

    install ipv6 /bin/true
  • Reboot.
• SuSE 9.1/9.2/9.3/10.0 (alternate method)/Mandriva (method 2)/Slackware:
  • In /etc/modprobe.conf, make sure you change
    alias net-pf-10 ipv6
    to
    alias net-pf-10 off

    alias ipv6 off
  • Reboot.
• Gentoo:
  • In /etc/modules.d/aliases, make sure you change
    alias net-pf-10 ipv6
    to
    alias net-pf-10 off

    alias ipv6 off
  • Reboot.

NOTES:
  • In distros using /etc/modprobe.conf, beware that you might get overriden by /etc/modprobe.conf.local or by /etc/modprobe.d/*.
  • If you disable IPv6, I suppose you don't need tunnels either. You could also add there:
    install sit0 /bin/true
  • A last "anti-IPv6" issue: don't forget the old trick of checking if your Firefox has IPv6 disabled:
    • CTRL+L, about:config (Enter)
    • Filter by ipv6.
    • Set network.dns.disableIPv6 to true.

转载地址:http://anzbb.baihongyu.com/

你可能感兴趣的文章
Java并发指南8:AQS中的公平锁与非公平锁,Condtion
查看>>
Java网络编程和NIO详解6:Linux epoll实现原理详解
查看>>
Java网络编程和NIO详解7:浅谈 Linux 中NIO Selector 的实现原理
查看>>
Java网络编程与NIO详解8:浅析mmap和Direct Buffer
查看>>
Java网络编程与NIO详解10:深度解读Tomcat中的NIO模型
查看>>
Java网络编程与NIO详解11:Tomcat中的Connector源码分析(NIO)
查看>>
深入理解JVM虚拟机1:JVM内存的结构与消失的永久代
查看>>
深入理解JVM虚拟机3:垃圾回收器详解
查看>>
深入理解JVM虚拟机4:Java class介绍与解析实践
查看>>
深入理解JVM虚拟机5:虚拟机字节码执行引擎
查看>>
深入理解JVM虚拟机6:深入理解JVM类加载机制
查看>>
深入了解JVM虚拟机8:Java的编译期优化与运行期优化
查看>>
深入理解JVM虚拟机9:JVM监控工具与诊断实践
查看>>
深入理解JVM虚拟机10:JVM常用参数以及调优实践
查看>>
深入理解JVM虚拟机12:JVM性能管理神器VisualVM介绍与实战
查看>>
深入理解JVM虚拟机13:再谈四种引用及GC实践
查看>>
Spring源码剖析1:Spring概述
查看>>
Spring源码剖析2:初探Spring IOC核心流程
查看>>
Spring源码剖析5:JDK和cglib动态代理原理详解
查看>>
Spring源码剖析6:Spring AOP概述
查看>>