The open port I set is 8888.
Then log in to the management page of the router and check the ip address ipconfig in cmd.
See that the management address of the router is192.168.1.1.
Enter192.168.1.1in the browser, and enter the user name and password to enter the management page. Click Forwarding Rules-Virtual Server to create a port map.
Add a new entry. The ip of this machine is192.168.1.108, and the port to be connected is 8888. (It should be the same as the port opened by Tomcat).
Click Save.
Then click the running status to view the router ip (note: the router ip is not necessarily an external network ip, but may have passed through other routes, and this article is only a layer of routing).
The ip of the route is 100.64.73. 154.
Close the page and enter100.64.73.154: 8888 in the browser.
However, for security reasons, you can map any port number that is not commonly used on the router (such as 8888) to port 3389 of the server, so that the software that scans 3389 on the external network will not scan your server.
Specifically, it is to set up a virtual server in the forwarding rules of the router.
However, does your external network have a fixed IP (192.168.1.8 is just an internal IP, which is invisible to the external network)? If not, you need to provide the boss with IP every time you visit the server, or you can apply for a peanut shell account if the router supports dynamic DNS.
You can search for' peanut shell' on the Internet to find its official website. After registering an account, that is, a free domain name, set it in the "dynamic DNS" of the router, and you can transfer this free addon domain to your current external IP. In other words, accessing this domain name is accessing your external IP. Even if your external IP changes due to disconnection and reconnection, you can directly find your current IP by visiting the peanut shell domain name.