If the external network is remote, you need to open the remote access permission on the route first, and then access the route remotely, just like the internal network.
If what you want to express is to set the ip and port of remote access, it depends on your router brand, but generally 1000 or more routes have the function of remote access. Take H3C as an example, enter the routing management interface, "Device Management"-"Remote Management", in which there are two items: web settings and telnet settings. Here is a screenshot for you. Other brands, you call to ask after-sales.
Typing is very tiring, but also with pictures, remember to adopt.