【发布时间】:2017-01-19 12:37:55
【问题描述】:
主题说出我所拥有的。 安装了 oracle 数据库实例的机器位于内部网络中,并且可以通过路由器设备访问 Internet。 我在路由器上设置了到这台机器的端口映射(1521->1521)。但 当我尝试使用 oracle 数据库连接主机上的 sqldeveloper 时,连接正常。但是当我尝试在远程机器上建立连接时,它看到端口(1521)已关闭。 此外,我向您展示我的 TNS 状态。
C:\Windows\system32>lsnrctl status
LSNRCTL for 64-bit Windows: Version 12.1.0.2.0 - Production on 19-JAN-2017 04:29:30
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=onoffline.ru)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 12.1.0.2.0 - Production
Start Date 19-JAN-2017 04:21:23
Uptime 0 days 0 hr. 8 min. 8 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File C:\app\Igor\product\12.1.0\dbhome_1\network\admin\listener.ora
Listener Log File C:\app\Igor\diag\tnslsnr\DESKTOP-LHFQ4BV\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc) (PIPENAME=\\.\pipe\EXTPROC1521ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=DESKTOP-LHFQ4BV) (PORT=5500))(Security= (my_wallet_directory=C:\APP\IGOR\admin\orcl\xdb_wallet)) (Presentation=HTTP)(Session=RAW))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "pdborcl" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
我注意到我关闭了端口转发,然后 telnet 等待时间过长并中止。但是当我为 1521 端口打开端口转发时,该连接立即被拒绝。
【问题讨论】:
-
如果服务器没有从 127.0.0.1 以外的任何地方监听,端口转发就无关紧要
-
是的,但是端口转发(例如 80 端口)工作正常!
-
您的网络服务器与数据库完全分离,所以我不明白您的意思
-
此外,将您的数据库暴露在 Internet 上是一个安全漏洞。在 Web 服务器上使用 REST API 正确查询数据库
-
分享
netstat -ano的输出(假设是windows)
标签: database oracle router tcp-ip