全部selinux和firewalld
[root@master ~]# setenforce 0 [root@master ~]# sed -i "s/enforcing/disabled/g" `grep enforcing -rl /etc/selinux/config` [root@master ~]# systemctl stop firewalld [root@master ~]# systemctl disable firewalld Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service. Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
查看
[root@master ~]# cat /etc/sysconfig/selinux # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # disabled - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of disabled. # disabled - No SELinux policy is loaded. SELINUX=disabled # SELINUXTYPE= can take one of three values: # targeted - Targeted processes are protected, # minimum - Modification of targeted policy. Only selected processes are protected. # mls - Multi Level Security protection. SELINUXTYPE=targeted
也可以开启指定端口
[root@localhost ~]# firewall-cmd --zone=public --add-port=80/tcp --permanent success [root@localhost ~]# firewall-cmd --zone=public --add-port=2222/tcp --permanent success [root@localhost ~]# firewall-cmd --reload success
继续阅读
- 我的QQ
- QQ扫一扫
-
- 我的头条
- 头条扫一扫
-
评论