linux系统关闭禁用防火墙

来源:互联网 发布:php开发和java开发 编辑:程序博客网 时间:2024/05/17 04:40

linux系统关闭禁用防火墙

linux在安装完成后会自动开启防火墙(firewalld),这将导致外部网络无法连接到操作系统。
一般情况下,我们都会选择关闭并禁用防火墙。

开启防火墙:

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

关闭防火墙:

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

设置防火墙开机自启动:

[root@localhost ~]# systemctl enable firewalld.serviceCreated 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.serviceRemoved symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
原创粉丝点击