安装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服务
[root@localhost ~]# chkconfig --add servicename 添加开机自动启动servicename服务
[root@localhost ~]# chkconfig --del servicename 删除开机自动启动servicename服务