您的位置:首页 > 运维架构 > Linux

linux系统关闭禁用防火墙

2017-11-30 17:18 302 查看

linux系统关闭禁用防火墙

linux在安装完成后会自动开启防火墙(firewalld),这将导致外部网络无法连接到操作系统。

一般情况下,我们都会选择关闭并禁用防火墙。

开启防火墙:

[root@localhost ~]# systemctl start firewalld.service


关闭防火墙:

[root@localhost ~]# systemctl stop firewalld.service


设置防火墙开机自启动:

[root@localhost ~]# systemctl enable firewalld.service
Created symlink from /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service to /usr/lib/systemd/system/firewalld.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/firewalld.service to /usr/lib/systemd/system/firewalld.service.


禁用防火墙自启动:

[root@localhost ~]# systemctl disable firewalld.service
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息