centos 防火墙的操作

systemctl start firewalld

systemctl restart firewalld

systemctl status firewalld

systemctl enable firewalld

关闭防火墙

systemctl stop firewalld

开机自己关闭

systemctl disable firewalld

设置安全配置 为关闭

vim /etc/sysconfig/selinux

 

重启虚拟机

reboot

查看安全策略是否关闭

getenforce

 

端口管理

firewall-cmd --permanent --add-port=8080-8085/tcp

firewall-cmd  --permanent --list-ports

firewall-cmd  --permanent --list-services

firewall-cmd --reload

firewall-cmd  --permanent --remove-port=8080-8085/tcp

 

posted @ 2019-03-20 08:35  apesplan  阅读(115)  评论(0编辑  收藏  举报