-A INPUT -p tcp -m state --state NEW -m tcp --dport 1521 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohib
service iptables status 查看防火墙状态
service iptables start 开启防火墙
service iptables stop 关闭防火墙
service iptables restart 重启防火墙
这样启动后远程连接会报错: oracle ORA-12514:TNS:listener does not currently know of service requested in connect descriptor 问题原因:数据库实例没注册到listener 解决方法一: 在listener.ora里面添加了一行 SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = orcl) (SID_NAME = orcl) ) )