Linux iptables开放特定端口
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash

·
如果系统已安装则调过安装步骤
yum list
|
grep iptables
安装iptables
yum
install iptables-services
重启防火墙使配置文件生效
systemctl restart iptables.service
设置iptables防火墙为开机启动项
systemctl
enable iptables.service
查看激活状态
systemctl status iptables.service
查看本机IPTABLES的设置情况
iptables -nL
开放端口,编辑配置
vim
/etc
/sysconfig
/iptables
添加
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
重启即可
启动指令:service iptables start
重启指令:service iptables restart
关闭指令:service iptables stop




A beautiful web dashboard for Linux
最近提交(Master分支:6 个月前 )
186a802e
added ecosystem file for PM2 4 年前
5def40a3
Add host customization support for the NodeJS version 4 年前
更多推荐
所有评论(0)