Oracle restricts the IP of the connection

Source: Internet
Author: User


In Oracle, you can control which IPs can connect to the database and which IP cannot connect to the database. In 9i and later, simply set the allowed IP and banned IP, modify Sqlnet.ora is the best and fastest method


1. Modify the Sqlnet.ora file

In the Linux version of Oracle, the default is no Sqlnet.ora for this file
$ cd $ORACLE _home/network/admin
$ VI Sqlnet.ora
#增加如下部分
Tcp.validnode_checking=yes

# allow access to IP
Tcp.invited_nodes= (192.168.100.252,192.168.100.253)

# disabled IP access
Tcp.excluded_nodes= (192.168.100.222,192.168.100.232)


2. Restart Monitoring
$ lsnrctl Stop
$ lsnrctl Start


This time, Only clients with IP address 192.168.100.252 and IP address 192.168.100.253 can connect to the database, while clients with IP address 192.168.100.222 and IP address 192.168.100.232 cannot connect to the database.

When clients of other IPs use PL/SQL to connect to the database, the following error is displayed:




Issues to be aware of:
1. You need to set the parameter to Yes to activate it.
2, it is recommended to set the allowed IP access, because the IP address may be arbitrarily modified, can not play its own purpose.
3. TCP overrides the Tcp.excluded_nodes setting when the address of the parameter Tcp.invited_nodes and tcp.excluded_nodes settings is the same.
4. Need to restart the listener to take effect.
5, this method is only suitable for the TCP protocol.
6. This configuration is suitable for 9i and above. Versions prior to 9i use file Protocol.ora.
7, directly connected to the database on the server is not affected.
8. This restriction is limited by the listener.
9, this limit is only for IP detection, for the user name detection is not supported.



Oracle restricts the IP of the connection

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.