centso关闭ipv6

参考:
[url]http://www.centoscn.com/CentOS/config/2015/0225/4734.html[/url]
[url]http://blog.youkuaiyun.com/yudar1024/article/details/41598057[/url]
[url]http://blog.youkuaiyun.com/bluishglc/article/details/41390785[/url]
[url]http://www.111cn.net/sys/CentOS/63645.htm[/url]
[url]http://blog.youkuaiyun.com/bluishglc/article/details/41390785[/url]
试了以上方法,然而并没有什么卵用!
试了以下终极方法:
查看端口监听:
[donald@test Desktop]$ netstat -ntlp
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 192.168.122.1:53 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN -
tcp6 0 0 :::3306 :::* LISTEN -
tcp6 0 0 :::22 :::* LISTEN -

tcp6在监控
[donald@test Desktop]$ sudo vim /etc/default/grub
修改如下
GRUB_TIMEOUT=5
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="[color=red]ipv6.disable=1[/color] rd.lvm.lv=centos/root rd.lvm.lv=centos/swap crashkernel=auto rhgb quiet"
GRUB_DISABLE_RECOVERY="true"
编译
[donald@test Desktop]$ sudo grub2-mkconfig -o /boot/grub2/grup.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-327.22.2.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-327.22.2.el7.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-229.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-229.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-56671d5c978444d688c5c3492b7628fd
Found initrd image: /boot/initramfs-0-rescue-56671d5c978444d688c5c3492b7628fd.img
done
重启
[donald@test Desktop]$ reboot
再次查看端口:
[donald@test Desktop]$ netstat -ntlp
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 192.168.122.1:53 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN -
tcp6 0 0 :::3306 :::* LISTEN -
tcp6 0 0 :::22 :::* LISTEN -
然并卵。。。。。。。。。。。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值