實例講解Oracle監(jiān)聽口令及監(jiān)聽器安全
來源:易賢網(wǎng) 閱讀:982 次 日期:2014-09-16 14:50:14
溫馨提示:易賢網(wǎng)小編為您整理了“實例講解Oracle監(jiān)聽口令及監(jiān)聽器安全”,方便廣大網(wǎng)友查閱!

很多人都知道,Oracle的監(jiān)聽器一直存在著一個安全隱患,假如不設置安全措施,那么能夠訪問的用戶就可以遠程關(guān)閉監(jiān)聽器。

相關(guān)示例:

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)))

命令執(zhí)行成功

大家可以發(fā)現(xiàn),此時缺省的監(jiān)聽器的日志還無法記錄操作地址:

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

為了更好的保證監(jiān)聽器的安全,大家最好為監(jiān)聽設置密碼:

[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

在我們設置密碼后,遠程操作將會因缺失密碼而出現(xiàn)失敗:

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: 監(jiān)聽程序尚未識別口令

注意:此時在服務器端或客戶端,都需要我們通過密碼來起停監(jiān)聽器:

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", status UNKNOWN, has 1 handler(s) for this service...

The command completed successfully

另外,ADMIN_RESTRICTIONS參數(shù)也是一個重要的安全選項,大家可以在 listener.ora 文件中設置 ADMIN_RESTRICTIONS_ 為 ON,此后所有在運行時對監(jiān)聽器的修改都將會被阻止,所有對監(jiān)聽器的修改都必須通過手工修改listener.ora文件才能順利完成。

更多信息請查看IT技術(shù)專欄

更多信息請查看數(shù)據(jù)庫
易賢網(wǎng)手機網(wǎng)站地址:實例講解Oracle監(jiān)聽口令及監(jiān)聽器安全
由于各方面情況的不斷調(diào)整與變化,易賢網(wǎng)提供的所有考試信息和咨詢回復僅供參考,敬請考生以權(quán)威部門公布的正式信息和咨詢?yōu)闇剩?/div>

2025國考·省考課程試聽報名

  • 報班類型
  • 姓名
  • 手機號
  • 驗證碼
關(guān)于我們 | 聯(lián)系我們 | 人才招聘 | 網(wǎng)站聲明 | 網(wǎng)站幫助 | 非正式的簡要咨詢 | 簡要咨詢須知 | 加入群交流 | 手機站點 | 投訴建議
工業(yè)和信息化部備案號:滇ICP備2023014141號-1 云南省教育廳備案號:云教ICP備0901021 滇公網(wǎng)安備53010202001879號 人力資源服務許可證:(云)人服證字(2023)第0102001523號
聯(lián)系電話:0871-65099533/13759567129 獲取招聘考試信息及咨詢關(guān)注公眾號:hfpxwx
咨詢QQ:526150442(9:00—18:00)版權(quán)所有:易賢網(wǎng)