linux 7.6防火墙关闭,centOS 7.x防火墙关闭

本文介绍了在Linux生产环境中关闭firewalld服务和SELinux的步骤,包括使用systemctl命令停止和禁止firewalld开机启动,以及设置SELinux为Permissive模式并修改配置文件以确保开机不启动。此操作适用于需要放开网络访问权限的场景。
摘要由CSDN通过智能技术生成

在生产库中一般不用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也需要关闭或者设置通过端口。

此时让网络那边开通权限即可远端登录。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值