感谢支持
我们一直在努力

SUSE Linux 10 SP2 关闭IPV6及防火墙

部分一:关闭ipv6


# ip add sh


1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue


    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00


    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo


    inet6 ::1/128 scope host


       valid_lft forever preferred_lft forever


2: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000


    link/ether 00:0c:29:7b:80:9b brd ff:ff:ff:ff:ff:ff


    inet 172.24.0.20/24 brd 172.24.0.255 scope global eth1


    inet6 fe80::20c:29ff:fe7b:809b/64 scope link


       valid_lft forever preferred_lft forever


由上面的标识可知,当前系统的ipv6已经启用了,那么现在要将ipv6关闭:


# vi /etc/modprobe.conf


将“alias net-pf-10         ipv6”修改为如下:


alias net-pf-10         off


alias ipv6              off


然后重启系统,一定要重启系统才能看到效果。


# ip add sh


1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue


    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00


    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo


2: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000


    link/ether 00:0c:29:7b:80:9b brd ff:ff:ff:ff:ff:ff


    inet 172.24.0.20/24 brd 172.24.0.255 scope global eth1 


部分二:使用命令永久关闭防火墙
(1)首先查看当前防火墙的状态


linux:~ # SUSEfirewall2 status


SuSE系统会默认启用防火墙的,而且防火墙中默认存在很多规则。此时可以用下面命令立即关闭防火墙:


linux:~ # SuSEfirewall2 stop


SuSEfirewall2: Warning: ip6tables does not support state matching. Extended IPv6 support disabled.


SuSEfirewall2: batch committing…


SuSEfirewall2: Firewall rules unloaded.


(2)上面的操作只是确定当前系统已经关闭了防火墙,但不确保系统重启后仍然是关闭防火墙的,所以还要进行下面的操作:


linux:~ # chkconfig –list | grep -i fire


SuSEfirewall2_init        0:off  1:off  2:off  3:off  4:off  5:off  6:off  B:on


SuSEfirewall2_setup       0:off  1:off  2:off  3:on   4:on   5:on   6:off


于是:


linux:~ # chkconfig SuSEfirewall2_setup off


linux:~ # chkconfig –list | grep -i fire


SuSEfirewall2_init        0:off  1:off  2:off  3:off  4:off  5:off  6:off  B:on


SuSEfirewall2_setup       0:off  1:off  2:off  3:off  4:off  5:off  6:off


linux:~ # chkconfig –level B SuSEfirewall2_init off


linux:~ # chkconfig –list | grep -i fire


SuSEfirewall2_init        0:off  1:off  2:off  3:off  4:off  5:off  6:off


SuSEfirewall2_setup       0:off  1:off  2:off  3:off  4:off  5:off  6:off


至此,系统的防火墙完成关闭了。

赞(0) 打赏
转载请注明出处:服务器评测 » SUSE Linux 10 SP2 关闭IPV6及防火墙
分享到: 更多 (0)

听说打赏我的人,都进福布斯排行榜啦!

支付宝扫一扫打赏

微信扫一扫打赏