Created
March 28, 2017 08:35
-
-
Save leapar/1ea9aca9d4d7717d7aecbcc0d568e6a5 to your computer and use it in GitHub Desktop.
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
iptables是linux下的防火墙,同时也是服务名称。 | |
service iptables status 查看防火墙状态 | |
service iptables start 开启防火墙 | |
service iptables stop 关闭防火墙 | |
service iptables restart 重启防火墙 | |
防火墙开放特定端口: | |
①文件/etc/sysconfig/iptables | |
②添加: | |
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT | |
★数字8080代表开放8080端口,也可以改成其他的端口★ | |
③重启防火墙 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment