Linux系统修改防火墙配置

防火墙配置文件位置 /etc/sysconfig/iptables

需要开放端口,请在里面添加一条内容即可:

1 -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 1521 -j ACCEPT

 1521是要开放的端口号,然后重亲启动linux防火墙服务。

linux下停止/启动防火墙服务的命令(root用户使用):

service iptables stop   --停止

service iptables start  --启动

 永久性生效,重启后不会复原

chkconfig iptables on    # 开启

chkconfig iptables off    # 关闭

 即时生效,重启后复原

service iptables start   # 开启

service iptables stop    # 关闭

 

posted @ 2018-04-13 15:34  Mr-Lee-long  阅读(4814)  评论(0编辑  收藏  举报