如何禁用SuSEfirewall2?


9

如何从外壳中禁用SuSEfirewall2(无酵母)?

我们使用OpenSuSE 12.3

我尝试过这个:

workdevel123:~ # systemctl disable SuSEfirewall2.service

但是我认为这不是解决方案:

workdevel123:~ # systemctl is-enabled SuSEfirewall2.service
Failed to issue method call: No such file or directory

Answers:


5

至少在openSUSE 12.1中,防火墙仍分为以下两个部分/etc/init.d

# systemctl disable SuSEfirewall2_setup.service
SuSEfirewall2_setup.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig SuSEfirewall2_setup off
# systemctl disable SuSEfirewall2_init.service
SuSEfirewall2_init.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig SuSEfirewall2_init off

但是,使用systemctl而不是仅仅chkconfig --set SuSEfirewall2_setup off应该“提供更多的未来证明”。

顺序很重要。_setup取决于_init。


当心远程执行此操作可能会中断您的连接。这样做使我辍学,不得不重新启动服务器。
托马斯


1

虽然/sbin/SuSEfirewall2 off正确,但您也可以使用systemctl

systemctl -q is-enabled SuSEfirewall2 && systemctl disable SuSEfirewall2
systemctl -q is-active SuSEfirewall2 && systemctl stop SuSEfirewall2
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.