Database version: 11.2.0.4 The database plane can restrict access to IP by configuring the relevant parameters in the Oracle Sqlnet.ora file.
First, modify the Sqlnet.ora fileSqlnet.ora file in the $oracle_home/network/admin directory, add the following: Tcp.validnode_checking=yes #允许访问的IP Tcp.invited_node S= (Ip1,ip2 ...) #禁止访问的IP tcp.excluded_nodes= (Ip1,ip2 ...)
Restart monitoring, effective! the other two parameter configurations will only take effect if you configure Tcp.validnode_checking=yes. Tcp.invited_nodes and tcp.excluded_nodes can be used simultaneously, or they can be used alone.
second, the relevant parameter descriptionRelated parameters: TCP. Validnode_checking, TCP. Invited_nodes, TCP. Excluded_nodes Official Document Description:TCP. Validnode_checkingPurpose:To enable and disable valid node checking for incoming connections. If this parameter was set to Yes and then incoming connections be allowed only if they originate from a node that conforms to List specified by TCP. Invited_nodes or TCP. Excluded_nodes parameters.Usage Notes:The TCP. Invited_nodes and TCP. Excluded_nodes parameters is valid only when the TCP. Validnode_checking parameter is set to Yes. Example:Tcp. Validnode_checking=yes TCP. Invited_nodesPurpose:To specify which clients is allowed access to the database. This list takesPrecedence overThe TCP. Excluded_nodes parameter If both lists is present.
TCP. Invited_nodes priority is higher than tcp.excluded_nodes. Syntax:Tcp. Invited_nodes= (hostname | ip_address, hostname | ip_address, ...)Usage Notes:This parameter was only valid when the TCP. Validnode_checking parameter is set to Yes. This parameter can use wildcards for IPv4 addresses and CIDR notation for IPV4 and IPv6 addresses.Example:Tcp. Invited_nodes= (sales.us.example.com, hr.us.example.com, 192.168.*, 2001:DB8:200C:433B/32)TCP. Excluded_nodesPurpose:To specify which clients is denied access to the database.Syntax:Tcp. Excluded_nodes= (hostname | ip_address, hostname | ip_address, ...)Usage Notes:This parameter was only valid when the TCP. Validnode_checking parameter is set to Yes. This parameter can use wildcards for IPv4 addresses and CIDR (classless inter-domain Routing) notation for IPv4 and IPv6 a Ddresses.Example:Tcp. Excluded_nodes= (finance.us.example.com, mktg.us.example.com, 192.168.2.25, 172.30.*, 2001:DB8:200C:417A/32) third, after testing , and did not discover what the Internet said needed to add the database server IP in the tcp.invited_nodes,
Limit IP access at the Oracle database level