本文共 1298 字,大约阅读时间需要 4 分钟。
本机监听先看listener.ora的配置是主机名还是IP,必须加入到下面的列表里。支持IP段设置。
[oracle@ admin]$ more sqlnet.oratcp.validnode_checking = yes tcp.invited_nodes = (本机IP,192.168.1.0/24,10.1.1.1) #tcp.excluded_nodes = (ip1,ip2)第一次启用ip限制后重启监听生效:lsnrctl stop
lsnrctl start 下次修改sqlnet.ora,只需lsnrctl reload即可。12c的参考:
5.2.68 TCP.EXCLUDED_NODES
Purpose
To specify which clients are denied access to the database.
Usage Notes
This parameter is only valid when the parameter is set to yes
.
This parameter can use wildcards for IPv4 addresses and CIDR notation for IPv4 and IPv6 addresses.
Syntax
CopyTCP.EXCLUDED_NODES=(hostname | ip_address, hostname | ip_address, ...)
Example
CopyTCP.EXCLUDED_NODES=(finance.us.example.com, mktg.us.example.com, 192.0.2.25,172.30.*, 2001:DB8:200C:417A/32)
5.2.69 TCP.INVITED_NODES
Purpose
To specify which clients are allowed access to the database. This list takes precedence over the TCP.EXCLUDED_NODES
parameter if both lists are present.
Syntax
CopyTCP.INVITED_NODES=(hostname | ip_address, hostname | ip_address, ...)
Usage Notes
This parameter is only valid when the parameter is set to yes
.
This parameter can use wildcards for IPv4 addresses and CIDR notation for IPv4 and IPv6 addresses.
Example
CopyTCP.INVITED_NODES=(sales.us.example.com, hr.us.example.com, 192.0.*, 2001:DB8:200C:433B/32)
转载地址:http://hnsof.baihongyu.com/