[Linux] Intranet penetration enables remote access to Zabbix enterprise-level monitoring platform

Preface

Zabbix is ​​an enterprise-level open source solution based on WEB interface that provides distributed system monitoring and network monitoring functions. It can monitor various network parameters to ensure the safe operation of the server system; and provides a flexible notification mechanism to allow system administrators to quickly locate/solve various existing problems.

The local zabbix web management interface is limited to LAN access only, which is usually inconvenient for remote access. The following introduces the Linux local zabbix, combined with the cpolar intranet penetration tool, to achieve remote and secure access to zabbix from any browser, greatly improving the convenience of access. sex!

This section mainly demonstrates how to remotely access the zabbix web management interface. If you need to configure and install an enterprise-level zabbix monitoring system, please refer to the official installation method: https://www.zabbix.com/cn/download

1. Access Zabbix from Linux LAN

In this example, for the convenience of demonstration, a zabbix 5.0 version is installed in the centos7 environment and started successfully. By accessing port 80 of Linux throughhttp://局域网ip:80/zabbix, we can see the zabbix web interface, which means that the local access is successful. Next, we install the cpolar intranet penetration tool to achieve remote access

image-20231012152134447

2. Install cpolar on Linux

Zabbix has been successfully installed in local Linux, and LAN access is OK. Next, we install the cpolar intranet penetration tool in Linux, and forward the http public network address mapped to the local port through cpolar. We can easily achieve remote access without registering ourselves. Domain name purchase cloud server. The following are the steps to install cpolar

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

  • Use one-click script installation command
curl -L https://www.cpolar.com/static/downloads/install-release-cpolar.sh | sudo bash
  • Add services to the system
sudo systemctl enable cpolar
  • Start cpolar service
sudo systemctl start cpolar

After cpolar is installed successfully, access the 9200 port of Linux on the external browser: [http://LAN ip:9200], log in using the cpolar account, and after logging in, you can see the cpolar web configuration interface, which is connected to the web management interface Just configure

image-20230831171159175

3. Configure Zabbix public network access address

Click Tunnel Management - Create Tunnel on the left dashboard to create a Zabbix cpolar public network address tunnel!

  • Tunnel name: The name can be customized. Be careful not to duplicate the existing tunnel name.
  • Protocol: Select http
  • Local address: 80 (Port for LAN access, if there is no input port for access, the default is: 80)
  • Domain name type: Choose a random domain name for free
  • Region: Select China

Click创建

image-20231012152836844

After the tunnel is successfully created, click 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

image-20231012152936926

4. Remotely access Zabbix over the public network

Use the above cpolar https public network address, plus the resource path/zabbix, access it in the browser of any device, and you can successfully see our zabbix web interface. Such a public The network address is created and can be accessed remotely. Using cpolar’s ​​public domain name, you can publish it to the public network for remote access without purchasing a cloud server. For subsequent Zabbix setup methods, you can refer to the official documentation to learn!

image-20231012153243706

5. Fixed Zabbix public network address

Since the tunnel created using cpolar above uses a random public network address, it will change randomly within 24 hours, which is not conducive to long-term remote access. Therefore, we can configure a second-level subdomain name for it. This address 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 a basic package or above, and the bandwidth corresponding to each package is different. [cpolar.cn has been registered]

Log in to the cpolar official website, click Reserve on the left, select to reserve the second-level subdomain name, set a second-level subdomain name, click Reserve, and copy the reserved second-level subdomain name after the reservation is successful. Level subdomain name

image-20231012153546253

After the reservation is successful, copy the name of the second-level subdomain name that was successfully reserved.

Return to 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

image-20231012153711455

Modify the tunnel information and configure the successfully reserved second-level subdomain name into the tunnel.

  • Domain name type: Select a second-level subdomain name
  • Sub Domain: Fill in the successfully reserved second-level subdomain name

Click更新(Note, click once to update, no need to submit again)

image-20231012153746539

After the update is completed, open the online tunnel list. At this time, you can see that the public network address has changed and the address name has become a domain name with a fixed second-level subdomain name.

image-20231012153808302

Finally, we use a fixed public network address to access, and we can see that the access is successful. In this way, a fixed and permanent public network address is set, and the zabbix interface can be accessed remotely anytime, anywhere, improving work efficiency!

image-20231012153931721

Guess you like

Origin blog.csdn.net/2301_77485708/article/details/134383585