首页 > Linux操作系统 > Linux操作系统 > centOS 7.x防火墙关闭
在生产库中一般不用Linux自带的防火墙,因此最好将防火墙关闭,具体如下:
[root@localhost ~]# systemctl stop 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. [root@localhost ~]# getenforce #查看selinux状态 Enforcing [root@localhost ~]# setenforce 0 #关闭selinux [root@localhost ~]# getenforce Permissive [root@localhost ~]# vim /etc/selinux/config #关闭selinux开机启动 SELINUX=disabled
保存退出后即可
注意:若有安装iptables或者ip6tables也需要关闭或者设置通过端口。
此时让网络那边开通权限即可远端登录。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/31550107/viewspace-2213733/ ,如需转载,请注明出处,否则将追究法律责任。