实例讲解Oracle监听口令及监听器安全

实例讲解Oracle监听口令及监听器安全,第1张

概述很多人都知道,Oracle的监听器一直存在着一个安全隐患,假如不设置安全措施,那么能够访问的用户就可以远程关闭监听器。 相关示例: D:>lsnrctl stop eygle LSNRCTL for 32-bit Windows: Version 10.2.0.3.0 - Production on 28-11月-2007 10:02:40 Copyright (c) 1991, 2006, Oracle. Al… 很多人都知道,Oracle的监听器一直存在着一个安全隐患,假如不设置安全措施,那么能够访问的用户就可以远程关闭监听器。
相关示例:
D:>lsnrctl stop eygle
LSNRCTL for 32-bit windows: Version 10.2.0.3.0 - Production on 28-11月-2007 10:02:40
copyright (c) 1991,2006,Oracle. All rights reserved.
正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCol=TCP)(HOST=172.16.33.11)(PORT=1521))
(CONNECT_DATA=(SERVICE_name=eygle)))
命令执行成功
大家可以发现,此时缺省的监听器的日志还无法记录 *** 作地址:
No longer Listening on: (DESCRIPTION=(ADDRESS=(PROTOCol=tcp)(HOST=172.16.33.11)(PORT=1521)))
28-NOV-2007 09:59:20 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=)(USER=administrator))(COMMAND=stop)
(ARGUMENTS=64)(SERVICE=eygle)(VERSION=169870080)) * stop * 0
为了更好的保证监听器的安全,大家最好为监听设置密码:
[oracle@jumper log]$ lsnrctl
LSNRCTL for linux: Version 9.2.0.4.0 - Production on 28-NOV-2007 10:18:17
copyright (c) 1991,2002,Oracle Corporation. All rights reserved.
Welcome to LSNRCTL,type "help" for information.
LSNRCTL> set current_Listener Listener
Current Listener is Listener
LSNRCTL> change_password
old password:
New password:
Reenter new password:
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCol=TCP)(HOST=172.16.33.11)(PORT=1521)))
Password changed for Listener
The command completed successfully
LSNRCTL> set password
Password:
The command completed successfully
LSNRCTL> save_config
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCol=TCP)(HOST=172.16.33.11)(PORT=1521)))
Saved ListENER configuration parameters.
Listener Parameter file /opt/oracle/product/9.2.0/network/admin/Listener.ora
old Parameter file /opt/oracle/product/9.2.0/network/admin/Listener.bak
The command completed successfully
在我们设置密码后,远程 *** 作将会因缺失密码而出现失败:
D:>lsnrctl stop eygle
LSNRCTL for 32-bit windows: Version 10.2.0.3.0 - Production on 28-11月-2007 10:22:57
copyright (c) 1991,Oracle. All rights reserved.
正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCol=TCP)(HOST=172.16.33.11)
(PORT=1521))(CONNECT_DATA=(SERVICE_name=eygle)))
TNS-01169: 监听程序尚未识别口令
注意:此时在服务器端或客户端,都需要我们通过密码来起停监听器:
LSNRCTL> set password
Password:
The command completed successfully
LSNRCTL> stop
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCol=TCP)(HOST=172.16.33.11)(PORT=1521)))
The command completed successfully
LSNRCTL> start
Starting /opt/oracle/product/9.2.0/bin/tnslsnr: please wait...
TNSLSNR for linux: Version 9.2.0.4.0 - Production
System parameter file is /opt/oracle/product/9.2.0/network/admin/Listener.ora
Log messages written to /opt/oracle/product/9.2.0/network/log/Listener.log
Trace information written to /opt/oracle/product/9.2.0/network/trace/Listener.trc
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCol=tcp)(HOST=172.16.33.11)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCol=TCP)(HOST=172.16.33.11)(PORT=1521)))
STATUS of the ListENER
------------------------
Alias ListENER
Version TNSLSNR for linux: Version 9.2.0.4.0 - Production
Start Date 28-NOV-2007 10:22:23
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level support
Security ON
SNMP OFF
Listener Parameter file /opt/oracle/product/9.2.0/network/admin/Listener.ora
Listener Log file /opt/oracle/product/9.2.0/network/log/Listener.log
Listener Trace file /opt/oracle/product/9.2.0/network/trace/Listener.trc
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCol=tcp)(HOST=172.16.33.11)(PORT=1521)))
Services Summary...
Service "eygle" has 1 instance(s).
Instance "eygle",status UNKNowN,has 1 handler(s) for this service...
Service "julia" has 1 instance(s).
Instance "eygle",has 1 handler(s) for this service...
The command completed successfully
另外,admin_RESTRICTIONS参数也是一个重要的安全选项,大家可以在 Listener.ora 文件中设置 admin_RESTRICTIONS_ 为 ON,此后所有在运行时对监听器的修改都将会被阻止,所有对监听器的修改都必须通过手工修改Listener.ora文件才能顺利完成。 总结

以上是内存溢出为你收集整理的实例讲解Oracle监听口令及监听器安全全部内容,希望文章能够帮你解决实例讲解Oracle监听口令及监听器安全所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/sjk/1154567.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-01
下一篇 2022-06-01

发表评论

登录后才能评论

评论列表(0条)

保存