centos查看端口占用及開啓防火牆端口

1.查看端口占用情況

#netstat -tunlp

 2.開啓防火牆端口

#/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT 

 3.保存防火牆端口開啓設置

#/etc/rc.d/init.d/iptables save 

 4.重啓防火牆 

#/etc/init.d/iptables restart

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章