linux开关防火墙

安装oracle11g后用plsql一直连不上,发现是linux防火墙阻止了。

使用service iptables stop后连接成功。

可是系统重启后防火墙又自动启动了。

所以要使用这个命令:

chkconfig iptables off

防火墙在系统重启后也不会自动启动了。


        1) 重启后生效

        开启: chkconfig iptables on
        关闭: chkconfig iptables off

        2) 即时生效,重启后失效
        开启: service iptables start
        关闭: service iptables stop

经验证这种方法不老管用。

查看开机自启动服务列表:

[root@localhost ~]#chkconfig --list

或者直接查看防火墙的设置:

[root@localhost ~]#chkconfig |grep iptables

iptables   0:off   1:off   2:on   3::on    4:on     5:on    6:off

使用命令

[root@localhost ~]#chkconfig --level 2345 iptables off

[root@localhost ~]#reboot

生效

 

[root@localhost ~]# chkconfig --list         显示开机可以自动启动的服务
[root@localhost ~]# chkconfig --add servicename 添加开机自动启动servicename服务
[root@localhost ~]# chkconfig --del servicename   删除开机自动启动servicename服务

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值