Nginx visual management tools and Cpolar to set up a server locally [Intranet Penetration]

Time:2024-4-16

preamble

Introduces the installation of Nginx Proxy Manager in Linux and combined with the cpolar intranet penetration tool to achieve remote access to the management interface, the same, when we use Nginx Proxy Manager to configure other local services.

1. Install docker

Enter the command, docker one-click start.

docker run -d -p 80:80 -p 81:81 -p 443:443 --restart=always -v ~/data:/data -v ~/letsencrypt:/etc/letsencrypt jc21/nginx-proxy-manager:latest

After you run it, type docker ps to see the running container. The command mounts three ports, 80 and 443, which are the ports for accessing the service, and 81, which is the port for the Nginx Proxy Manager management page.

Nginx visual management tools and Cpolar to set up a server locally [Intranet Penetration]

2. Local access

After the above service is set up, first access the management interface of port 81, you can see the Nginx Proxy Manager login interface, enter the default account: [email protected] and default password:changemeYou can login, this is the Linux internal browser access, such as LAN ip access, you need to check whether the firewall is closed! After the local access is correct, the following installation of cpolar intranet penetration tools

Nginx visual management tools and Cpolar to set up a server locally [Intranet Penetration]

3. Linux installation of cpolar

Above we deployed the Nginx Proxy Manager in Linux, the following we install cpolar intranet penetration tool in Linux, through the cpolar forwarding local port mapping http public address, we can easily realize the remote access, without having to register a domain name to buy cloud servers. Here are the steps to install cpolar

cpolar official website address: https://www.cpolar.com

  • Installation commands using one-click scripts
curl -L https://www.cpolar.com/static/downloads/install-release-cpolar.sh | sudo bash
  • Adding services to the system
sudo systemctl enable cpolar
  • Start the cpolar service
sudo systemctl start cpolar

cpolar installation is successful, in an external browser to access Linux port 9200 that is // LAN ip: 9200], use the cpolar account to log in, log in to see the cpolar web configuration interface, down in the web management interface can be configured!

Nginx visual management tools and Cpolar to set up a server locally [Intranet Penetration]

4. Configure the public network access address

Here we use Nginx Proxy Manager’s internal nginx proxy forwarding mechanism, combined with cpolar’s public address, to realize the forwarding of local port 81 Nginx Proxy Manager web management interface services can be accessed remotely.

Click on Tunnel Management – Create Tunnel in the left dashboard to create a cpolar public address tunnel for Nginx Proxy Manager!

  • Tunnel name: can be customized, be careful not to duplicate the existing tunnel name.
  • Protocol: choose http
  • Local address: 81 (port for local services)
  • Domain Type: Free random domain name selection
  • Region: Select China vip

strike (on the keyboard)establish

Nginx visual management tools and Cpolar to set up a server locally [Intranet Penetration]

After the tunnel is successfully created, click the status on the left — Online tunnel list to view the generated public network access address. There are two access methods, one is http and https, and then copy the public network address generated by cpolar. The http:// protocol name in front of it does not need to be copied!

Nginx visual management tools and Cpolar to set up a server locally [Intranet Penetration]

Open the Nginx Proxy Manager management interface and log in, then click theAdd Proxy Host,

Nginx visual management tools and Cpolar to set up a server locally [Intranet Penetration]

Enter the cpolar domain name intoDomain NamesIn the following, enter the local service port and local ip, here is the demonstration of the configuration of the Nginx Proxy Manager web management interface, if it is other services, you can change the port to other service ports, enter the completion of the click on Save!

Nginx visual management tools and Cpolar to set up a server locally [Intranet Penetration]

5. Remote access to the public network

After the above additions are completed, you can see an added record in the management interface list, and it is Online status.

Nginx visual management tools and Cpolar to set up a server locally [Intranet Penetration]

At this time you can use cpolar public address in any device browser to access the Nginx Proxy Manager management interface. Here we are using http access, https also need to be configured separately, you can refer to the official documentation for details

Nginx visual management tools and Cpolar to set up a server locally [Intranet Penetration]

6. Fixed public network address

As the above tunnel created using cpolar uses a random public address, it will change randomly within 24 hours, which is not conducive to long-term remote access. Therefore, we can configure a second-level sub-domain for it, which is a fixed address and will not change randomly [ps: cpolar.cn has been filed].

Note that you need to upgrade the cpolar package to the basic package or above, and each package corresponds to a different bandwidth. [cpolar.cn has been filed].

Login to cpolar official websiteClick Reserve on the left side, select Reserve Second Level Sub-Domain, set a second level sub-domain name, click Reserve, and then copy the name of the reserved second level sub-domain after it is successfully reserved.

Nginx visual management tools and Cpolar to set up a server locally [Intranet Penetration]

Copy the name of the successfully reserved second-level subdomain after the reservation is successful

Nginx visual management tools and Cpolar to set up a server locally [Intranet Penetration]

Go back to logging into the cpolar web UI management interface, click Tunnel Management – Tunnel List on the left dashboard, find the tunnel you want to configure and click Edit on the right side

Nginx visual management tools and Cpolar to set up a server locally [Intranet Penetration]

Modify the tunnel information to configure a successfully reserved second-level subdomain into the tunnel

  • Domain type: select a second-level subdomain
  • Sub Domain:Fill in the second level sub domain name which is successfully reserved.

strike (on the keyboard)update(Note that it is sufficient to click on the update once, there is no need to repeat the submission)

Nginx visual management tools and Cpolar to set up a server locally [Intranet Penetration]

After the completion of the update, open the online tunnel list, at this time you can see the public address has changed, the address name has become a fixed second-level sub-domain name of the domain name, we fixed the domain name configuration to the Nginx management interface over there!

Nginx visual management tools and Cpolar to set up a server locally [Intranet Penetration]

Edit the record we added above, the

Nginx visual management tools and Cpolar to set up a server locally [Intranet Penetration]

Then we change the cpolar random address to a fixed address and click save.

Nginx visual management tools and Cpolar to set up a server locally [Intranet Penetration]

After saving, you can see that the address of the list becomes a fixed public address

Nginx visual management tools and Cpolar to set up a server locally [Intranet Penetration]

Use cpolar public address, open in any browser, you can access our local services

Nginx visual management tools and Cpolar to set up a server locally [Intranet Penetration]

Reprinted from cpolar polar cloud article: Nginx visual management tools + Cpolar configuration remote access to local services

Recommended Today

[Parameter Adjustment Magic] PID Parameter Adjustment Using VOFA+Upper Unit (with lower unit code)

1. What is VOFA+? Simply speaking, VOFA+ is a super serial assistant, in addition to realize the serial data sending and receiving of the general serial assistant, it can also realize the data plotting (including histogram, FFT chart), control editing, image display and other functions. Using VOFA+, it can bring convenience to our usual debugging […]