庄泽波の博客

好记性不如烂笔头

Open/Close Port in Centos

1. Show status

/etc/init.d/iptables status

2.Set Port

iptables -I INPUT -p tcp --dport 80 -j ACCEPT
iptables -I INPUT -p tcp --dport 443 -j ACCEPT

3.Save change

/etc/init.d/iptables save

4.Restart

/etc/init.d/iptables restart

  

 

posted on 2017-11-11 21:36  庄泽波  阅读(147)  评论(0编辑  收藏  举报

导航