
systemctl start firewalld

4. 细节讨论:
- 关闭或者启用防火墙后,立即生效。[telnet 测试 某个端口即可]


- 当把防火墙关闭的时,就能连接上111端口了,其他端口都是开启的状态
-
- 这种方式(
systemctl start/stop firewalld
)开启或关闭某个服务只是临时生效,当重启系统后,还是回归以前对服务的设置。
- 如果希望设置某个服务自启动或关闭永久生效,要使用
systemctl [enable|disable] 服务名
-
-
- 先用
systemctl is-enabled 服务名
(查询某个服务是否是自启动的) 命令查看这个服务是不是自启动的状态

- 使用
systemctl disable firewalld
时,下次重启系统时防火墙还是处于关闭的状态

版权声明:本文内容来自第三方投稿或授权转载,原文地址:https://blog.51cto.com/xdr630/5086037,作者:兮动人,版权归原作者所有。本网站转在其作品的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如因作品内容、版权等问题需要同本网站联系,请发邮件至ctyunbbs@chinatelecom.cn沟通。