今天是2013-08-24,不对刚刚过了12点,应该是2013-08-25日,今天我的同事对数据库 进行监听安全加固失败,然后 我的哥们也做了同样的实验,结果还是失败,至此我不知道 什么原因,在此想对显伟兄说一句,对此我感到很抱歉,我没有拿出时间来和你研究这个问题的错误,希望得到大家的谅解。写这篇日志,就是为了展示我怎么做的。希望对 大家有帮助。也欢迎高手提出见解和宝贵的意见,小海我坦然耐心虚心接受,我知道不懂的虚心去学习的人,终究会失去成功的机遇。好了。在此记录一下笔记:

其实我一直不赞同设置监听保护,但是可能是为了完成安全扫描的要求才进行整改的。它的安全扫描就一定正确吗?对于我来说只有经历过真正实验过才知道答案,不能胡说八道。
notice:
Ensure that the password has not been set in the listener.ora file. The local operating system authentication will secure the listener administration. The remote listener administration is disabled when the password has not been set. This prevents brute force attacks of the listener password.
 
Remember that the listener password has been deprecated in this release, and will not be supported in the next release of Oracle Database

好,步骤如下:
[oracle@oracle-one admin]$ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 25-AUG-2013 00:21:12

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Starting /opt/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /opt/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /opt/app/oracle/diag/tnslsnr/oracle-one/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle-one)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle-one)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                25-AUG-2013 00:21:12
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /opt/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /opt/app/oracle/diag/tnslsnr/oracle-one/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle-one)(PORT=1521)))
The listener supports no services
The command completed successfully

ok,看到我们现在的security 为:Local OS Authentication,然后设置password,如下:

[oracle@oracle-one admin]$ lsnrctl

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 25-AUG-2013 00:21:16

Copyright (c) 1991, 2009, Oracle.  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=oracle-one)(PORT=1521)))
Password changed for listener
The command completed successfully
LSNRCTL> save_config
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle-one)(PORT=1521)))
Saved LISTENER configuration parameters.
Listener Parameter File   /opt/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Old Parameter File   /opt/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.bak
The command completed successfully
LSNRCTL> set password
Password:
The command completed successfully
LSNRCTL> save_config
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle-one)(PORT=1521)))
No changes to save for LISTENER.
The command completed successfully
LSNRCTL> exit
[oracle@oracle-one admin]$ pwd
/opt/app/oracle/product/11.2.0/dbhome_1/network/admin
[oracle@oracle-one admin]$ vi listener.ora

# listener.ora Network Configuration File: /opt/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =(DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = oracle-one)(PORT = 1521))))

ADR_BASE_LISTENER = /opt/app/oracle

#----ADDED BY TNSLSNR 25-AUG-2013 00:22:10---
PASSWORDS_LISTENER = 555BD864D140F721
#--------------------------------------------
LOCAL_OS_AUTHENTICATION_LISTENER=OFF

[oracle@oracle-one admin]$ lsnrctl stop

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 25-AUG-2013 00:23:10

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle-one)(PORT=1521)))
The command completed successfully
[oracle@oracle-one admin]$ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 25-AUG-2013 00:23:15

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Starting /opt/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /opt/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /opt/app/oracle/diag/tnslsnr/oracle-one/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle-one)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle-one)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                25-AUG-2013 00:23:15
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Password
SNMP                      OFF
Listener Parameter File   /opt/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /opt/app/oracle/diag/tnslsnr/oracle-one/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle-one)(PORT=1521)))
The listener supports no services
The command completed successfully
[oracle@oracle-one admin]$

ok,这就好了,看到Security                  ON: Password,然后查看一下状态,发现需要使用密码
[oracle@oracle-one admin]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 25-AUG-2013 00:23:53

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle-one)(PORT=1521)))
TNS-01169: The listener has not recognized the password

ok,然后我输入密码查看状态。如下:

[oracle@oracle-one admin]$ lsnrctl

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 25-AUG-2013 00:24:00

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> set current_listener listener
Current Listener is listener
LSNRCTL> set password
Password:
The command completed successfully
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle-one)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                25-AUG-2013 00:23:15
Uptime                    0 days 0 hr. 1 min. 26 sec
Trace Level               off
Security                  ON: Password
SNMP                      OFF
Listener Parameter File   /opt/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /opt/app/oracle/diag/tnslsnr/oracle-one/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle-one)(PORT=1521)))
Services Summary...
Service "RHYS.ORACLE" has 1 instance(s).
  Instance "RHYS", status READY, has 1 handler(s) for this service...
Service "RHYSXDB.ORACLE" has 1 instance(s).
  Instance "RHYS", status READY, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL>
至此已经完成操作了。

好了 ,回头看一下,他为什么不成功,我猜测
1)密码设置正确,但是没有取消os认证LOCAL_OS_AUTHENTICATION_LISTENER=OFF如下:
[oracle@oracle-one admin]$ lsnrctl

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 25-AUG-2013 00:28:04

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> set current_listener listener
Current Listener is listener
LSNRCTL> start
Starting /opt/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /opt/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /opt/app/oracle/diag/tnslsnr/oracle-one/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle-one)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle-one)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     listener
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                25-AUG-2013 00:28:20
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /opt/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /opt/app/oracle/diag/tnslsnr/oracle-one/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle-one)(PORT=1521)))
The listener supports no services
The command completed successfully
LSNRCTL> change_password
Old password:
New password:
Reenter new password:
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle-one)(PORT=1521)))
Password changed for listener
The command completed successfully
LSNRCTL> save_config
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle-one)(PORT=1521)))
Saved listener configuration parameters.
Listener Parameter File   /opt/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Old Parameter File   /opt/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.bak
The command completed successfully
LSNRCTL> set password
Password:
The command completed successfully
LSNRCTL> save_config
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle-one)(PORT=1521)))
No changes to save for listener.
The command completed successfully
LSNRCTL> stop
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle-one)(PORT=1521)))
The command completed successfully
LSNRCTL> start
Starting /opt/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /opt/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /opt/app/oracle/diag/tnslsnr/oracle-one/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle-one)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle-one)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     listener
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                25-AUG-2013 00:28:56
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Password or Local OS Authentication
SNMP                      OFF
Listener Parameter File   /opt/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /opt/app/oracle/diag/tnslsnr/oracle-one/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle-one)(PORT=1521)))
The listener supports no services
The command completed successfully
LSNRCTL> exit
[oracle@oracle-one admin]$
[oracle@oracle-one admin]$ lsnrctl stop

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 25-AUG-2013 00:30:17

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle-one)(PORT=1521)))
The command completed successfully
[oracle@oracle-one admin]$
看到了,还是可以直接关闭的。
2)监听名字错误。
ok。至此结束了。

oracle 之监听保护的更多相关文章

  1. Oracle修改监听端口号1521[转]

    在oracle中,默认的监听端口号为1521,一旦有人扫描出这个端口号就会知道此服务器为oracle数据库服务器,存在极其大的安全隐患,在这里,教大家如何修改oracle默认端口号为9999: 1.查 ...

  2. Oracle 数据库监听配置和服务

    -- 补充说明 如果要远程连接192.168.10.44上的oracle,那么192.168.10.44服务器必须启动TNSListener.(配置文件 listener.ora) PLSQL Dev ...

  3. Oracle修改监听端口教程

    Oracle默认监听端口1521,一众扫描器通常通过探测1521端口是否开启来探测是否存在Oracle服务,如果修改默认监听端口在一定程度上可以提升数据库和主机的安全性. 比如这里我们修改成2521为 ...

  4. 修改oracle默认监听端口

    修改oracle默认监听端口 oracle端口修改 主要是修改两个文件和修改oracle参数local_listener 1 查看当前监听状态 [oracle@test ~]$ lsnrctl sta ...

  5. Windows环境下修改Oracle实例监听IP地址

    Windows环境下修改Oracle实例监听IP地址. 配置文件路径:<ORACLE_HOME>\NETWORK\ADMIN 如:C:\Oracle11gR2\product\11.2.0 ...

  6. Oracle 静态监听注冊具体解释

    Oracle 静态监听注冊具体解释 网上有非常多关于oracle 监听静态注冊的文章.但大多都是简单说说,并没有具体的样例.这里,将结合linux as4 下的oracle 10gR2.0.1 举一个 ...

  7. Oracle 11g 监听很慢,由于监听日志文件太大引起的问题(Windows 下)

    现象:Windows 操作系统的Oracle 数据库,使用sqlplus 连接(不指定实例名)连接很快,程序连接或使用连接工具或在Net Manager 中测试连接都需要花费约三四十秒的时间(程序连接 ...

  8. Oracle数据库监听服务无法启动

    (1) 安装好Oracle后,启动Net Manager,测试orcl失败,报错“ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服务”,需要修改监听文件.修改前: # list ...

  9. 怎样绕过oracle listener 监听的password设置

     怎样绕过oracle 监听的password设置: 1.找到监听进程pid ,并将它kill 掉 ps -ef|grep tns [oracle@lixora admin]$ ps -ef|gr ...

随机推荐

  1. 自动化运维工具 ~puppet~

    一.模板的应用 到目前为止,资源申报.定义类.声明类等所有功能都只能一个manifest文件中实现,但这却非有效的基于puppet管理IT资源架构的方式.实践 中,一般需要把manifest文件分解成 ...

  2. 理解JavaScript中BOM和DOM的关系

    JavaScript 有三部分构成,ECMAScript,DOM和BOM,根据宿主(浏览器)的不同,具体的表现形式也不尽相同,IE和其他的浏览器风格迥异.对象是JavaScript最重要的API,包含 ...

  3. BZOJ 1500: [NOI2005]维修数列 (splay tree)

    1500: [NOI2005]维修数列 Time Limit: 10 Sec  Memory Limit: 64 MBSubmit: 4229  Solved: 1283[Submit][Status ...

  4. UCS UTF UTF-7 UTF-8 UTF-16

    Unicode也是一种字符编码方法,不过它是由国际组织设计,可以容纳全世界所有语言文字的编码方案.Unicode的学名是"Universal Multiple-Octet Coded Cha ...

  5. [Asp.net web api]缓存

    摘要 为了提高接口的性能,我们常做的优化就包括缓存,对经常访问但变化不大的数据进行缓存.或者使用http的缓存,减少请求的次数. web api缓存 在提供的api,我们也可以实现缓存,来减少访问的次 ...

  6. C#监控文件夹变化

    当需要监控某一文件,FileSystemWatcher类提供了Created, Deleted,Rename等事件. 就拿FileSystemWatcher的Created事件来说,该事件类型是Fil ...

  7. Extjs文件选择器

    Ext.hoo.component.FileBrowserComponent.js /** * Ext.hoo.component.FileBrowserWindow 系统文件浏览选择组件,可以选定电 ...

  8. 试用log4jdbc

    近日发现一个好东东log4jdbc,他是一个JDBC驱动器,能够记录SQL日志和SQL执行时间等信息.log4jdbc使用SLF4J(Simple Logging Facade For Java)作为 ...

  9. Java中List效率的比较

    Java Collections Framework(JCF) 是Java SE中一个基本的类集,几乎所有的项目都会用到,其中的List 则是JCF中最最常用的一个接口.围绕List 接口,有很多实现 ...

  10. QT编程之——使用全局变量

    在Qt中使用全局变量的实例 1.首先须要在一个头文件里对全局了变量使用exern方法进行定义. //g.h extern char *testStr; 2.仅仅能在cpp文件里对事实上例化,而且实例化 ...