Linux 防火墙开放特定端口 (iptables)

1、查看状态:iptables -L -n
2、直接编辑:vi /etc/sysconfig/iptables
3、端口开放:-A INPUT -p tcp -m tcp --dport 4000 -j ACCEPT
4、保存文件::wq
5、重启防火墙:service iptables restart

猜你喜欢

转载自www.cnblogs.com/fangts/p/8888188.html