How to use your own computer or local server to build a fixed access address (no fixed public IP) can configure the domain name and https, super simple

Problem requirements:

        The company has two idle ThinkPadStation P910s, which have been kept in the corner, and they are all grayed out. It happens that there are a lot of large files that need to be uploaded recently. Alibaba Cloud, Qiniu Cloud, etc. require money for storage and everything, two servers All of them are 8T storage, it is a waste not to use it, so I searched for various information on the Internet, and finally let the server successfully go to the cloud;

Prerequisites:

       1: Broadband requires a public network IP;

       2: Select PPPoE to access the Internet, router dial-up, cat not dial-up;

       3: A dynamic DNS domain name;

Start of construction

     1: Check whether you have a public network IP, open the router to check the IP address of the wan port, and then open Baidu to search for the IP, and see if the two results are the same. If they are the same, it is the public network IP. If they are inconsistent, please contact customer service. It is said that home monitoring requires a public network IP, but this public network IP is changed;

      Like the mainstream routers nowadays, there will be Nat mapping or virtual server functions. Students who did not find contact me

      tplink is here

Open here and you can see that there are valid interfaces, external network ports, internal ports, internal server addresses, etc., 

Let's make a mapping for him

The name of the rule is to make a memo for each mapping

Which wan port is the effective interface

The external port is the port address for external access, which can be inconsistent with the service of the internal network

The internal port is the open port of your server or your computer

The internal server IP is the IP address that provides the service

If the service protocol is Http, you can choose TCP, except for other protocols

Just turn on the status;

At this point, a simple non-fixed IP server has been built.

You can try to visit

First of all, Baidu will check the computer IP you set up for the service, so Baidu

Then Baidu can bring the local IP (that is, the IP address that provides the service)

Then add this Ip to the external network port just configured to access the service mapped by the server;

However, this ip will not change for a while, it will always change after a period of time

You can see that the visit was successful;

But if this is the case, it is inconvenient for us to not be able to provide services to the program;

So now routers have dynamic DNS configuration, you can apply for a dynamic dns resolution, now these are free, if the configuration is still not accessible, then refresh the dns resolution, restart the network card, or change the dns server address;

I applied for it online, 

Then the access process is roughly like this, 

The client accesses the dynamic dns server, the dynamic dns server accesses the router to obtain the latest router address, and then the dns server obtains the latest server address and forwards it to the server address.

The fixed configuration here is complete, 

If you want to change the domain name or something, or configure https to contact the author; 

Author WeChat:

Finally, a few notes:

Regarding safety issues:

As long as the router opens the designated port, it is enough to do related current limiting or IP detection on the port. 

Because our data security may be relatively low, we have made a cluster to ensure that server data will not be lost;

Regarding usage issues:

The server is powered on, the company is on the Internet, and the service will not be a problem

Guess you like

Origin blog.csdn.net/qq_38821574/article/details/108916749