今天是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. 【JavaScript代码实现三】JS对象的深度克隆

    function clone(Obj) { var buf; if (Obj instanceof Array) { buf = []; // 创建一个空的数组 var i = Obj.length; ...

  2. POJ 3320 Jessica's Reading Problem 尺取法/map

    Jessica's Reading Problem Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7467   Accept ...

  3. Codeforces Round #234 (Div. 2) A. Inna and Choose Options 模拟题

    A. Inna and Choose Options time limit per test 1 second memory limit per test 256 megabytes input st ...

  4. JQ中get()与eq()的区别

    .eq() : 减少匹配元素的集合,根据index索引值,精确指定索引对象. .get() : 通过检索匹配jQuery对象得到对应的DOM元素. 同样是返回元素,那么eq与get有什么区别呢? eq ...

  5. ARM JTAG 20

    http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0499b/BEHEIHCE.html he ARM JTAG 20 co ...

  6. C# 中提取表中的某一项数据

  7. Android实例剖析笔记(一)

    摘要:用实例讲解Andriod的开发过程 开卷语 俗话说,“熟读唐诗三百首,不会作诗也会吟”.最近收集了很多Android的示例代码,从这些代码的阅读和实验中学习到很多知识,从而产生写这个系列的打算, ...

  8. 禁用IE缓存

    HTTP消息报头包括普通报头.请求报头.响应报头.实体报头. 普通报头中的Cache-Control用于指定缓存指令,缓存指令是单向的(响应中出现的缓存指令在请求中未必会出现),且是独立的(一个消息的 ...

  9. CMMI管理体系

    帮助企业对软件工程过程进行管理和改进,增强开发与改进能力,从而按时,不超过预算地开发软件. CMMI为改进一个组织的各种过程提供了一个单一的集成化框架,新的集成模块框架消除了各个模型的不一致性,减少了 ...

  10. 【MySQL案例】mysql-libs-5.1.73-3.el6_5.x86_64 conflicts with file from package Percona-Server-server

    假设遇到mysql-libs-5.1.73-3.el6_5.x86_64 conflicts with file from package Percona-Server-server报错,有两种情况导 ...