手机版
你好,游客 登录 注册
背景:
阅读新闻

Oracle的一些安全加固配置

[日期:2012-08-09] 来源:Linux社区  作者:gtlions [字体:大 中 小]
接下来测试下结果,当然要重启下linstener。
[Oracle@test admin]$ lsnrctl stop

LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 08-AUG-2012 14:39:39

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.4)(PORT=1521)))
TNS-01169: The listener has not recognized the password
[oracle@test admin]$ lsnrctl status

LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 08-AUG-2012 14:39:48

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.4)(PORT=1521)))
TNS-01169: The listener has not recognized the password
可以看到上面的stop和status操作都失败了,如下操作是成功的:
[oracle@test admin]$ lsnrctl

LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 08-AUG-2012 14:40:00

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

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> stop
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.4)(PORT=1521)))
TNS-01169: The listener has not recognized the password
LSNRCTL> set password
Password:
The command completed successfully
LSNRCTL> stop
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.4)(PORT=1521)))
The command completed successfully
LSNRCTL> start
Starting /u01/oracle/10g/product/10.2.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 10.2.0.5.0 - Production
System parameter file is /u01/oracle/10g/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/oracle/10g/product/10.2.0/db_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.4)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.4)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.5.0 - Production
Start Date                08-AUG-2012 14:40:33
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Password
SNMP                      OFF
Listener Parameter File   /u01/oracle/10g/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File         /u01/oracle/10g/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.4)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "gt10g" has 1 instance(s).
  Instance "gt10g", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.4)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.5.0 - Production
Start Date                08-AUG-2012 14:40:33
Uptime                    0 days 0 hr. 0 min. 2 sec
Trace Level               off
Security                  ON: Password
SNMP                      OFF
Listener Parameter File   /u01/oracle/10g/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File         /u01/oracle/10g/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.4)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "gt10g" has 2 instance(s).
  Instance "gt10g", status UNKNOWN, has 1 handler(s) for this service...
  Instance "gt10g", status READY, has 1 handler(s) for this service...
Service "gt10gXDB" has 1 instance(s).
  Instance "gt10g", status READY, has 1 handler(s) for this service...
Service "gt10g_XPT" has 1 instance(s).
  Instance "gt10g", status READY, has 1 handler(s) for this service...
The command completed successfully

3. 设置连接IP限制
通过修改sqlnet.ora配置文件,以限制来源IP是否可以访问数据库:
tcp.validnode_checking = yes 
tcp.invited_nodes = (localhost,ip1,ip2)
注意,一定要把本机的地址添加进去,否则连数据库本机都无法注册到监听。

-The End-

linux
相关资讯       Oracle数据库 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的���意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款