日期:2014-05-16  浏览次数:20351 次

如何禁止特定IP访问Oracle数据库

  通过使用数据库服务器端的sqlnet.ora文件可以实现禁止指定IP主机访问数据库的功能,这对于提升数据库的安全性有很大的帮助,与此同时,这个技术为我们管理和约束数据库访问控制提供了有效的手段。下面是实现这个目的的具体步骤仅供参考:

  1.默认的服务器端sqlnet.ora文件的内容:

  这里我们以Oracle10.2.0.3版本为例进行简述,先来看一下当前sqlnet.ora文件内容:

?

  #?This?file?is?actually?generated?by?netca.?But?if?customers?choose?to?
  #?install?"Software?Only",?this?file?wont?exist?and?without?the?native?
  #?authentication,?they?will?not?be?able?to?connect?to?the?database?on?NT.?
  SQLNET.AUTHENTICATION_SERVICES?=?(NTS)

?

  2.确认客户端的IP地址:

?

  C:\Documents?and?Settings\Administrator>ipconfig?
  WindowsIP?Configuration?
  Ethernet?adapter?Local?Area?Connection?2:?
  Media?State?.?.?.?.?.?.?.?.?.?.?.?:?Media?disconnected?
  Ethernet?adapter?Local?Area?Connection:?
  Connection-specific?DNS?Suffix?.?:?
  IP?Address.?.?.?.?.?.?.?.?.?.?.?.?:?9.123.112.16?
  Subnet?Mask?.?.?.?.?.?.?.?.?.?.?.?:?255.255.255.0?
  Default?Gateway?.?.?.?.?.?.?.?.?.?:?9.123.112.1

?

  3.在客户端分别使用tnsping命令和sqlplus命令来验证数据库的连通性:

?

友情链接: 爱易网 云虚拟主机技术 云服务器技术 程序设计技术 开发网站 APP开发教程
Copyright © 2013-2024 爱易网页 当前在线:1239人  网站在23时16分38秒内访问总人数:261672人 当前 23.12%  粤ICP备18100884号-2