centos7关闭防火墙

IT
IT
IT
352
文章
1
评论
2020年3月22日15:41:25 评论 1,979 1039字阅读3分27秒

全部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扫一扫
  • weinxin
  • 我的头条
  • 头条扫一扫
  • weinxin
CentOS 最后更新:2020-3-27
IT
  • 本文由 发表于 2020年3月22日15:41:25
  • 除非特殊声明,本站文章均为原创,转载请务必保留本文链接
Centos7.9安装jumpserverV2.6.2 jumpserver

Centos7.9安装jumpserverV2.6.2

简述 使用官方提供的一键安装自带docker部署,最后简单配置下即可。 安装目录在 /opt/jumpserver-installer-v2.6.2 系统 # cat /etc/redhat-rele...
Centos7安装frp CentOS

Centos7安装frp

下载 官网下载地址 https://github.com/fatedier/frp 解压 # tar -xvf frp_0.34.3_linux_arm64.tar 移动至 /usr/local # ...