I have a computer in the local area network and deployed web services. Now I hope everyone can access it. Obviously, this computer has only one local area network ip, and there is no public network ip, so the devices in the same local area network can find it through the local area network ip, while other devices can’t find you. At most, they can only find your router, but they can’t enter your local area network.
Then you need to penetrate the intranet. First, it is very easy for your router to be assigned a fixed public ip, but it is extremely rare that you need to map some ports of the router to some ports of a computer on the LAN in the router, and then you can access it using the public ip+port number.
Case 2: Your router has been assigned a temporary public IP. This is more common than case 1, but it is still rare to operate as above. However, because the public IP will change, the client will also change each time. If you have a domain name, you can use ddns to resolve your domain name to the changed public IP, and automatically change the resolution when the public IP changes.
Case 3: Your router is assigned an intranet ip. This is the most common situation. At this time, you must establish a long connection to the ECS through an ECS intranet machine with a public ip. Then the ECS can actively transmit data to the intranet machine. The ECS forwards the data of its own port to the intranet machine. Then the client can access the intranet machine by accessing the port of the ECS.
Now that I have an ECS, why bother to use an intranet computer? Possible data is more important. If you don’t want to put it on the ECS, you may not have enough ECS configuration, and your service needs high cpu, high memory and high disk capacity. If you buy an ECS, you can use frp
To map. If there is no cloud server, there is free frp service online. You can find it, but it may be unstable.