iptables的配置文件/etc/sysconfig/iptables不存在怎么办


iptables的配置文件/etc/sysconfig/iptables不存在怎么办

首先要看一下iptables是否安装了,使用service iptables status或yum info iptables看一下当前状态

如果已安装,运行以下命令:

iptables -A INPUT -p tcp --dport 22 -j ACCEPT

service iptables save

这样就会提示

iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]

这样就会有iptables的初始配置文件了


免责声明!

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



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