Linux 开启相关端口及查看已开启端口

防火墙层面:
 
/sbin/iptables -I INPUT -p tcp --dport 8011 -j ACCEPT #开启8011端口 
/etc/rc.d/init.d/iptables save #保存配置 
/etc/rc.d/init.d/iptables restart #重启服务 
查看端口是否已经开放
/etc/init.d/iptables status
 
查看端口:
netstat -pan|grep 2809
 

猜你喜欢

转载自www.cnblogs.com/Small-sunshine/p/11733098.html