Created
August 15, 2018 03:42
-
-
Save zhangludi/f8ae2b9c849e736015724a2703a92528 to your computer and use it in GitHub Desktop.
centos7 防火墙 firewalld
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
链接: https://www.jianshu.com/p/bad33004bb4f | |
永久的开放需要的端口 | |
sudo firewall-cmd --zone=public --add-port=3000/tcp --permanent | |
sudo firewall-cmd --reload | |
之后检查新的防火墙规则 | |
firewall-cmd --list-all | |
关闭防火墙 | |
由于只是用于开发环境,所以打算把防火墙关闭掉 | |
//临时关闭防火墙,重启后会重新自动打开 | |
systemctl restart firewalld | |
//检查防火墙状态 | |
firewall-cmd --state | |
firewall-cmd --list-all | |
//Disable firewall | |
systemctl disable firewalld | |
systemctl stop firewalld | |
systemctl status firewalld | |
//Enable firewall | |
systemctl enable firewalld | |
systemctl start firewalld | |
systemctl status firewalld |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment