日期:2014-05-16  浏览次数:20896 次

SUSE Linux 立即关闭防火墙的命令和指定开放某些端口(转载)
转载自:http://www.justwinit.cn/post/2939/

SUSE防火墙查看命令

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

SUSE防火墙立即停止命令

linux:~ # SuSEfirewall2 stop
SuSEfirewall2: Warning: ip6tables does not support state matching. Extended IPv6 support disabled.
SuSEfirewall2: batch committing...
SuSEfirewall2: Firewall rules unloaded.

在SUSE11.2下测试通过。
-----------------------------------------------
SUSE默认的防火墙设置为禁止所有外来联结。如果你想开放某个端口的话,就得修改防火墙设置开放这个端口。本文介绍了怎么修改SUSE的防火墙设置以开放某指定端口。
手动修改:
#vi /etc/sysconfig/SUSEfirewall2
#TCP端口的情况:
FW_SERVICES_EXT_TCP = "6000"
#UDP端口的情况:
FW_SERVICES_EXT_UDP = "177"
防火墙设置的生效:
#rcSUSEfirewall2 restart