[No Public IP Intranet Penetration] Offsite Remote Access to Local SQL Server Database

Time:2023-10-13

catalogs

1. Preface

2. Local Installation and Setup of SQL Server

2.1 SQL Server Download

2.2 SQL Server Local Connection Testing

2.3 Cpolar Intranet Penetration Download and Installation

2.3 Cpolar Intranet Penetration Registration

3. Local Web Publishing

3.1 Cpolar Cloud Setup

3.2 Cpolar Local Settings

4. Public network access test

5. Conclusion


1. Preface

The importance of the database believe that we all understand, as a variety of data electronic folder, which may contain a variety of information, from the enterprise staff information to website access or transaction data everything, and even in some scenarios, the database has become one of the conditions essential to the normal operation of the enterprise. Like any other job in an organization, databases need to be maintained as necessary. However, after the test of the mask period, it seems necessary to do a remote operation setup for their own database. Today, I will introduce you, how to use cpolar intranet penetration, remote connection and operation of SQL Server.

2. Local Installation and Setup of SQL Server

Microsoft SQL Server is considered a relatively well-known relational database management software, although it is not considered to be the most widely used, but as a Microsoft product, it has good compatibility with its own Windows series of operating systems, so it is very suitable for application in a variety of hardware with Windows operating system installed, and assume the responsibility of data management software.

2.1 SQL Server Download

Since SQL Server is a Microsoft product, it can be easily downloaded from the Microsoft website (SQL Server Downloads | Microsoft

[No Public IP Intranet Penetration] Offsite Remote Access to Local SQL Server Database

Click on the desired version to download (I chose Developer) and double-click on the downloaded .exe file for automatic installation.

[No Public IP Intranet Penetration] Offsite Remote Access to Local SQL Server Database

inInstallation modeoption, again select the desired mode. Here, the author has selected thefundamentalInstallation mode.

[No Public IP Intranet Penetration] Offsite Remote Access to Local SQL Server Database

The next step is to go all the wayNextReady to complete the installation process

2.2 SQL Server Local Connection Testing

After completing the installation, SQL Server will automatically go to the operator interface, where we click on the followingConnect NowButton.

[No Public IP Intranet Penetration] Offsite Remote Access to Local SQL Server Database

This will bring up the SQLCMD command line window, as long as the display shows the content as shown below, it means that our local SQL Server installation is complete.

[No Public IP Intranet Penetration] Offsite Remote Access to Local SQL Server Database

2.3 Cpolar Intranet Penetration Download and Installation

Next, we move on to installing the key software for connecting remotely to SQL Server: Cpolar. as with Microsoft SQL Server, we can log in to the Cpolar website (www.cpolar.com), click on the top of the home pagedownloadingbutton to go to the cpolar download page and download the desired version of the cpolar software. Of course, we choose the Windows version for download here.

[No Public IP Intranet Penetration] Offsite Remote Access to Local SQL Server Database

After the download of Cpolar is complete, unzip the downloaded file and click on the .msi file to access the cpolar auto-installer, just go all the way to theNextIt will complete the installation.

[No Public IP Intranet Penetration] Offsite Remote Access to Local SQL Server Database

[No Public IP Intranet Penetration] Offsite Remote Access to Local SQL Server Database

2.3 Cpolar Intranet Penetration Registration

Since cpolar is differentiated by registered users, it creates separate data tunnels for each user (whether free or paid), supplemented by separate passwords and token codes for each user, thus guaranteeing the security of users’ data. Therefore, before using cpolar, we need to register, the registration process is also very simple, directly click on the cpolar official website on the upper right button of theenrollmentbutton to enter the user registration page, and then set the user name, password and a few other simple information to complete the registration of new users.

[No Public IP Intranet Penetration] Offsite Remote Access to Local SQL Server Database

[No Public IP Intranet Penetration] Offsite Remote Access to Local SQL Server Database

3. Local Web Publishing

At this point we have installed SQL Server and cpolar on the local computer, next we can use cpolar intranet penetration to create a data tunnel that can connect directly to the local SQL Server from the public Internet to achieve the purpose of remote access to SQL Server.

It should be noted that the free version of cpolar sets the data tunnel address to be reset on a 24-hour cycle, while the VIP version allows you to create a long-term stable and unchanged data tunnel address. However, we do not know when we will need to connect to the database remotely (I have suffered a big loss due to the temporary control of the epidemic), so I upgraded cpolar to the VIP version, in order to create a long-term stable data tunnel.

3.1 Cpolar Cloud Setup

First, we log in to the cpolar client in theinstrument panelOn the left side of the page findreservebutton to enter the “Reservation” page of the data tunnel.

[No Public IP Intranet Penetration] Offsite Remote Access to Local SQL Server Database

On the cpolar reservations page, we find theReserved TCP addressfield, set a public address for the SQL Server we want to connect to, which can be viewed as the entry point of the data tunnel, or it can be interpreted as a blank data tunnel (after all, the tunnel entry set up here has not yet been associated with the output port of the local software).

[No Public IP Intranet Penetration] Offsite Remote Access to Local SQL Server Database

inReserved TCP addressfield, we just have to make two simple settings: the

  • Region: the server is located in the region, we can choose the nearest
  • Description: can be seen as a comment of this data tunnel, as long as it is easy to distinguish

Once you have completed these two settings, you can click the “Reserve” button on the right side to fix the entrance to this data tunnel.

[No Public IP Intranet Penetration] Offsite Remote Access to Local SQL Server Database

Here we need to set theaddressThe contents of the field are copied down and will be needed to this address for setup in the cpolar client. When we no longer need this data tunnel, we can also click on the right side of thexDelete this reserved tunnel to save precious tunnel slots.

The free version of the temporary data tunnel does not require cpolar cloud setup, you can directly set up the cpolar client, but it is not possible to set up a data tunnel that can be stable for a long time.

3.2 Cpolar Local Settings

Next, we go back to the cpolar client installed on our local computer (which can be accessed by clicking on the shortcut from the start menu, or by typing localhost: 9200 directly into your browser). On the left side of cpolar’s client, we click on theTunnel ManagementunderlyingCreating a Tunnelbutton for local data tunnel setup to connect the tunnel portal created by cpolar cloud to the local SQL Server.

Of course, there are still some settings that need to be made to create a data tunnel, specifically:

  1. Tunnel Name: This field can also be seen as a note for the data tunnel to differentiate it from other locally created tunnels, here we typeMicrosoft SQL
  2. protocols: This column is an application scenario for intranet penetration, such as publishing web pages, data transfer, hardware interconnection, etc. In this example, select theTCP protocol
  3. local address: This field needs to be filled in with the SQL Server output port number, i.e., port1433(SQL Server’s default port number);
  4. Port Type: This column is mainly the duration of the intranet to penetrate the data tunnel, intends to use for a long time to chooseFixed TCP portsIf it is only for testing or temporary use, then select theRandom Temporary TCP Ports(Note that fixed TCP ports require cpolar to be upgraded to Professional and above)
  5. reserved TCP addressThis field is only available to users who have selected “Fixed TCP port”, and will not appear if the “Random temporary TCP port” option is checked. Fill in theFixed TCP port address reserved for success

Once you have completed these settings, you can click on the followingestablishbutton to connect the blank data tunnel reserved in the cpolar cloud to the local SQL output port.

[No Public IP Intranet Penetration] Offsite Remote Access to Local SQL Server Database

After completing the creation of the local data tunnel, the cpolar client automatically jumps to theTunnel ManagementunderlyingTunnel ListPage.

Here we can clearly see the operation of all data tunnels (whether they are normally online or disconnected) and perform operations on a data tunnel, such as starting, stopping or deleting it, and if we want to make changes to the information of an existing data tunnel, we can also find the editing portal here.

[No Public IP Intranet Penetration] Offsite Remote Access to Local SQL Server Database

4. Public network access test

After completing the setup of the cpolar client, we can click on thestate of affairsunderlyingOnline Tunnel Listpage, find the address of the remote access to the local SQL Server (that is, the tunnel entrance), we paste this address into different remote database management software, we can connect to the local SQL Server.

[No Public IP Intranet Penetration] Offsite Remote Access to Local SQL Server Database

For example, at the Windows command line (the tcp:// at the top of the public address does not need to be copied)

sqlcmd -s public address:public port number

[No Public IP Intranet Penetration] Offsite Remote Access to Local SQL Server Database

Or use the Navicat tool to connect to the page in thehostsfield, fill in the address generated by cpolar (remove the top tcp:// and put a colon before the end numeric port number)Change to comma

[No Public IP Intranet Penetration] Offsite Remote Access to Local SQL Server Database

Similarly, we can also connect remotely using the SSMS GUI, again in the connection screen, by pasting the address generated by cpolar into theserver namefield (remove the tcp:// at the top and change the colon “:” to a comma “,” before the numeric port number at the end), you can connect to SQL Server on your local computer.

[No Public IP Intranet Penetration] Offsite Remote Access to Local SQL Server Database

5. Conclusion

At this point, we have completed the setup of the local Microsoft SQL Server via remote login, and using the address generated by cpolar, you can log in to SQL Server from multiple database management software, greatly increasing the convenience of our work.

Recommended Today

uniapp and applet set tabBar and show and hide tabBar

(1) Set the tabBar: uni.setTabberItem({}); wx.setTabberItem({}); indexnumberisWhich item of the tabBar, counting from the left, is indexed from 0.textstringnoButton text on tabiconPathstringnoImage PathselectedIconPathstringnoImage path when selectedpagePathstringnoPage absolute pathvisiblebooleannotab Whether to display uni.setTabBarItem({ index: 0, text: ‘text’, iconPath: ‘/path/to/iconPath’, selectedIconPath: ‘/path/to/selectedIconPath’, pagePath: ‘pages/home/home’ }) wx.setTabBarItem({ index: 0, text: ‘text’, iconPath: ‘/path/to/iconPath’, selectedIconPath: ‘/path/to/selectedIconPath’, pagePath: ‘pages/home/home’ }) […]