Linux利用iptables开放指定端口的方法
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash

·
使用iptables开放如下端口
/sbin/iptables -I INPUT -p tcp --dport 8000 -j ACCEPT
保存
重启服务
service iptables restart
查看需要打开的端口是否生效?
/sbin/iptables -I INPUT -p tcp --dport 8000 -j ACCEPT
保存
/etc/rc.d/init.d/iptables save
iptables-save命令用于将linux内核中的iptables表导出到标准输出设备商,通常,使用shell中I/O重定向功能将其输出保存到指定文件中。而原来的配置文件将保存为iptables.save。
重启服务
service iptables restart
查看需要打开的端口是否生效?
/etc/init.d/iptables status




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