centos6 iptables端口开放


首先,停止iptables服务

[root@lsx03 ~]# service iptables stop

一、查看iptables状态

[root@lsx03 ~]# /etc/init.d/iptables status

检查端口是否已经开放

二、配置iptables策略

[root@lsx03 ~]# vi /etc/sysconfig/iptables

添加:

-A INPUT -m state --state NEW -m tcp -p tcp --dport 10050 -j ACCEPT

:wq

重启iptables服务即可

三、iptables

iptables重启

service iptables restart

开机自启动

chkconfig iptables on

开机不启动

chkconfig iptables off

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM