Linux禁用防火墙规则的命令_linux 防火墙开启端口
最编程
2024-08-11 15:51:33
...
大家好,又见面了,我是你们的朋友全栈君。
linux防火墙禁用方法一:
Linux中现主要有两套管理服务的软件。
大多数的发行版使用SysV init的系统启动进程管理体系,即service和chkconfig命令来配置和控制服务,例如CentOS 6
有些发行版则默认使用比较新的也是争议很大的systemd体系,例如CentOS 7。
CentOS 6:
service iptables start #启动防火墙
service iptables stop #关闭防火墙
chkconfig iptables off #禁止防火墙开机启动
CentOS 7:
systemctl start firewalld.service #启动firewall
systemctl stop firewalld.service #关闭firewall
systemctl disable firewalld.service #禁止firewall开机启动
linux防火墙禁用方法二:
查看防火墙状态
# service iptables status
关闭防火墙
# service iptables stop
linux防火墙禁用方法三:
关闭iptables
#service iptables stop #关闭iptables服务
#chkconfig iptables off #开机不启动
调整selinux状态:
# setenforce 0 #调整到宽松模式
# vim /etc/selinux/config
SELINUX=disabled #以后开机selinux都禁用
推荐阅读
-
Linux防火墙状态、开启和关闭命令的查看方法
-
Linux关闭防火墙firewall和iptables的命令
-
linux关闭防火墙或开启防火墙命令_linux防火墙怎么关闭
-
Linux禁用防火墙规则的命令_linux 防火墙开启端口
-
linux关闭防火墙或开启防火墙命令_linux重启防火墙命令
-
Linux防火墙的端口开放和启用:在Linux系统中,如何设置防火墙开放端口?
-
Linux:防火墙开启或停用,以及开放端口(包含Centos 7、Centos 6)
-
Linux防火墙状态的查看与开启关闭命令
-
Linux系统中用于设置防火墙的命令
-
linux下查看防火墙状态、关闭防火墙、开放关闭端口等-6. 整理防火墙命令