初学者必读:Oracle监听口令及监听器安全

来源:未知 责任编辑:责任编辑 发表时间:2015-09-17 09:42 点击:

很多人都知道,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, 2006, 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

发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
用户名: 验证码:点击我更换图片
最新评论 更多>>

推荐热点

  • 在oracle数据库下使用iSQL*Plus DBA访问数据库
  • oracle 让sys用户可以使用isqlplus
  • Oracle数据库Constraint约束的常用操作及异常处理
  • ORACLE10gr2数据导入MySQL方案
  • OCP043第十五讲 Database Security
  • export/import的使用
  • Oracle行列转换小结
  • Table函数使用简介
  • Bulk Collect性能分析(zz)
网站首页 - 友情链接 - 网站地图 - TAG标签 - RSS订阅 - 内容搜索
Copyright © 2008-2015 计算机技术学习交流网. 版权所有

豫ICP备11007008号-1