Linux/centosoracle10g control connection IP Address
Oracle controls the IP address of the connected database
Simply set allowed IP addresses and prohibited IP addresses
In 9i and later, modifying sqlnet. ora is actually the best and fastest way.
1: Modify the sqlnet. ora File
In oracle of linux, the file sqlnet. ora is not used by default.
$ Cd $ ORACLE_HOME/network/admin
$ Vi sqlnet. ora
# Add the following parts
Tcp. validnode_checking = yes
# IP addresses allowed for access
Tcp. invited_nodes = (192.168.100.252, 192.168.100.253)
# IP addresses that are not allowed to access
Tcp. excluded_nodes = (192.168.100.222, 192.168.100.133)
2: restart the listener
$ Lsnrctl stop
$ Lsnrctl start
At this time, only clients with the IP address 192.168.100.252 and the IP address 192.168.100.253 can connect to the database. clients with the IP address 192.168.100.222 and the IP address 192.168.100.htm cannot connect to the database. When clients of other IP addresses use PL/SQL to connect to the database, the following error is displayed:
Notes:
1. You must set the parameter YES to activate the service.
2. It is recommended that you set the IP addresses that are allowed to be accessed, because the IP addresses may be modified at will and cannot be used for your own purposes.
3. the listener must be restarted to take effect.
4. This method is only applicable to the TCP protocol.
5. This configuration applies to 9i and later versions. Use the file protocol. ora in versions earlier than 9i.
6. directly connecting to the database on the server is not affected.
7. This restriction only applies to IP detection and is not supported for user name detection.