
用root用户权限执行 禁止iptables服务命令
chkconfig iptables off
方法2) 关闭SuSE Linux管理防火墙的服务
1. 检查 SuSE防火墙是否设置为启动
chkconfig --list | grep firewall
2. 关闭防火墙服务
chkconfig SuSEfirewall2_init off
chkconfig SuSEfirewall2_setup off
CentOS7(Linux)如何关闭防火墙?Linux如何关闭防火墙
关闭防火墙
零、RHEL 6(CentOS6)
# 临时关闭防火墙
servcie iptables stop
# 永久关闭防火墙
chkconfig iptables off
一、RHEL 7 (CentOS 7)
# 开机不自动启动防火墙
sudo systemctl disable firewalld.service
# 关闭防火墙
sudo systemctl stop firewalld.service
二、 SLES
sudo chkconfig SuSEfirewall2_setup off
sudo chkconfig SuSEfirewall2_init off
sudo rcSuSEfirewall2 stop
三、Unutu
sudo service ufw stop
sudo ufw disable
开启防火墙
零、RHEL 6(CentOS6)
# 临时开启防火墙
servcie iptables start
# 永久开启防火墙
chkconfig iptables on
一、RHEL 7 (CentOS 7)
# 开机自动启动防火墙
sudo systemctl enable firewalld.service
# 关闭防火墙
sudo systemctl start firewalld.service
# 查看防火墙状态
sudo systemctl status firewall.service
# 重新启动防火墙
sudo systemctl restart firewall.service
二、 SLES
sudo chkconfig SuSEfirewall2_setup on
sudo chkconfig SuSEfirewall2_init on
sudo rcSuSEfirewall2 start
三、Unutu
sudo service ufw start
或者
sudo ufw
RHEL7(CentOS7 启动关闭服务命令)
启动一个服务:systemctl start firewalld.service
关闭一个服务:systemctl stop firewalld.service
重启一个服务:systemctl restart firewalld.service
显示一个服务的状态:systemctl status firewalld.service
在开机时启用一个服务:systemctl enable firewalld.service
在开机时禁用一个服务:systemctl disable firewalld.service
查看服务是否开机启动:systemctl is-enabled firewalld.service
查看已启动的服务列表:systemctl list-unit-files|grep enabled
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)