Remotely connect to the Oracle database through the public network [intranet penetration]

Forwarded from the article of CSDN remote penetration: Remote connection to the Oracle database through the public network [intranet penetration]

foreword

Oracle is a relational database management system of Oracle Corporation, which has always been in a leading position in the database field. It can be said that the Oracle database system is a popular relational database management system in the world. The system has good portability, convenient use, and strong functions, and is suitable for various large, medium, and small computer environments. It is a high-efficiency, reliable, and high-throughput database solution.

In this tutorial, we will build an Oracle database locally, and through cpolar intranet penetration, map the local port to the public network, and realize remote connection and access through PL/SQL tools in the public network environment.

1. Database construction

Install the oracle database, enter the official download, the installation here is the official 19C version

Select Download Microsoft Windows 64-bit Download

2023021411601

After downloading, unzip and install. During the installation process, you need to set a password. The password is the password required for login.

2023021411602

Open PL/SQL after installation

2023021411603

After opening, enter the user name: system, the password is the password set above, and the sql appears to indicate that the login is successful

2023021411604

2. Intranet penetration

At present, the database can only be accessed in the local area network, but we can use the cpolar internal network penetration tool to map the oracle database in the internal network to the public network to achieve remote access.

2.1 Install cpolar intranet penetration

cpolar official website: https://www.cpolar.com/

Go to the download page of cpolar official website, download the windows installation package to the local and unzip it all the way to install by default

20230214113215

2.2 Create a tunnel map

After cpolar installation is successful, double-click to open cpolar [or access the local 9200 port 127.0.0.1:9200 on the browser ], use the cpolar email account to log in to the web UI management interface, if you have not registered a cpolar account, click Register for free, you will jump to Just register an account on cpolar official website.

20230214113806

After successful login, click Tunnel Management on the left dashboard - Create Tunnel, and create a TCP protocol tunnel pointing to the local port 1521 (oracle default port)

  • Tunnel name: can be customized, be careful not to duplicate the existing tunnel name
  • protocol: tcp
  • Local address: 1521
  • Domain name type: choose a random domain name for free
  • Region: Default China top

click创建

2023021411605

After the tunnel is successfully created, click on the status on the left - online tunnel list, you can see that the tunnel just created has generated a corresponding public network address, copy it

2023021411606

3. Public network remote access

Open the PLSQL graphical tool, enter the tcp public network address, enter the user name: systm and password, the password is the password set when creating the database

2023021411607

After connecting, execute to view the system table, and the data appears to indicate success

2023021411608·

4. Configure a fixed TCP port address

Since the tunnel created above is a random address tunnel, the address will change within 24 hours. In order to make the connection more stable, the tcp connection address needs to be fixed.

4.1 Reserve a fixed public network TCP port address

Log in to the cpolar official website, click Reserve on the left, and select the reserved TCP address. Let's first reserve a fixed port address for remote Oracle.

  • Region: Select China VIP
  • Description: Remarks, which can be customized

click保留

2023021411610

After the address is successfully reserved, the system will generate a corresponding fixed public network address and copy it down

2023021411611

4.2 Configure a fixed public network TCP port address

Access port 9200 on the browser, http://127.0.0.1:9200/, log in to the cpolar web ui management interface, click the tunnel management on the left dashboard - tunnel list, find the svn tunnel, and click edit on the right

2023021411612

Modify the tunnel information and configure the successfully reserved fixed tcp address into the tunnel

  • Port type: modified to fixed tcp port
  • Reserved tcp address: fill in the successfully reserved address

click更新

2023021411613

After the tunnel is successfully updated, click the status on the left dashboard - online tunnel list, find the minecraft tunnel, and you can see that the public network address has been updated to a fixed tcp address.

2023021411614

4.3 Test remote Oracle using fixed TCP port address

Open PLsql again and use a fixed tcp address to connect

2023021411615

After logging in, execute the query system form select * from DBA_TABLES, and the data appears to indicate that the connection is successful

2023021411616

Guess you like

Origin blog.csdn.net/weixin_46626339/article/details/129951111
Recommended