Quickly resolve dynamic domain name resolution, realize external network access to internal network database

Today, I would like to share with you how to use fast resolution dynamic domain name resolution to realize external network access to intranet mysql database under two specific network environments.

The first type of network environment : the router is assigned a dynamic public network IP, and has the router login management authority. How to access the internal mysql database from the external network?

For this kind of network environment, firstly, the internal network uses fast resolution dynamic domain name resolution, and the domain name is fixed and resolved to the routing public IP in real time, and then the mysql database port mapping is performed on the router. When accessing the mysql database from the external network, use dynamic domain name resolution.

The second network environment : The mysql database server is a dynamic public IP. How to implement external network access to mysql database?

For this kind of network environment, fast resolution dynamic domain name resolution is used on the mysql database server , and then the mysql database is accessed through the dynamic domain name resolution. Compared with the first network environment solution , this solution has fewer routers and router port mapping, and the implementation process is relatively simple.

Implementation process:

Step 1: Clear intranet access.

Specify the intranet access address port of the mysql database to ensure that the mysql database service is normal and the intranet can be accessed and connected normally. For example, my local mysql database access address is localhost:3306.

 

Step 2: Use fast resolution dynamic domain name resolution on the intranet .

The intranet server installs the fast resolution client and uses it. Sign in with your own account. If you do not have an account, "register an account" to enter the website to register an account.

Add intranet mapping . Here , you can change the internal network address of the application to the external network address in one step .

The relevant information related to the mapping filling is as follows:

Application port (common server port): WEB server (web server): port 80; FTP server (file server): port 21; terminal server: port 3389; mail server: port 25 (SMTP) and port 110 (POP) ;VPN server: port 1723;

Public network port type: Select according to the application requirements of your own scenario.

Intranet address: Intranet access fixed address. It can be a fixed intranet IP or a computer name. If the mapping is used on the server, it is recommended to fill in the 127.0.0.1 format.

 

Realize external network domain name access . After adding dynamic resolution, check the current . The dynamically resolved domain name is kept corresponding to the local public network IP.

The third step: router port mapping, routing mapping mysql database access port.

Because the public network IP is on the router, access from the external network needs to go through routing, and port mapping needs to be done on the router to open the internal network mysql database access port. Router port mapping location: forwarding rules/virtual server/add port and protocol allowed for external network access. My mysql database port is the default 3306, and the intranet IP address corresponding to the mysql database host on my intranet is 192.168.1.22.

Step 4: When accessing from the external network, use dynamic domain name resolution.

When accessing the mysql database on the external network, use the dynamic resolution domain name to connect and access. The domain name is unchanged, and it can be accessed immediately after accessing the Internet, and there is no need to worry about the change of the dynamic public network IP.

If there is no public IP locally, you need to use the fast resolution port mapping method. Quick-analysis port mapping does not require routing settings to connect to the internal and external networks, and does not require public network IP. It can be used online. After full port mapping, the visitor needs to install the fast resolution client on the access end and use it.

Through fast analysis and mapping penetration, access to intranet databases-oracle, mysql, and mssql can also be realized through the external network.

Guess you like

Origin blog.csdn.net/asdaddsd/article/details/130460851