Jump to content
  • Entries

    16114
  • Comments

    7952
  • Views

    86375396

Contributors to this blog

  • HireHackking 16114

About this blog

Hacking techniques include penetration testing, network security, reverse cracking, malware analysis, vulnerability exploitation, encryption cracking, social engineering, etc., used to identify and fix security flaws in systems.

Nezha probe can conveniently monitor the server's real-time network, disk and other status. Moreover, the interface is beautiful and simple to build, and it is a good tool in our daily operation and maintenance. In this article, let’s learn its installation process together.

Preparation

A server (kali is OK) Gitee account (github is unstable in China) domain name (not required)

Register oauth

For security, Nezha probe does not use local login. Instead, it uses third-party login interfaces such as Gitee and Github. Because Github is always in a state of distraction, he chose the domestic Gitee platform.

01 Registering two Gitee accounts is a problem with the third-party login interface. The author cannot log in with the same account when deploying. Whether Gitee or Github, you need two accounts, that is, use A to create an oauth application and use B to authorize login. 02 Create an oauth application login account, visit https://gitee.com/oauth/applications, and create an application. After creation is completed, the effect is as follows:

Callback address format:

http://{Server IP}:8008/oauth2/callback hxl3uyswbwo106.png

Record the ID and Secret values.

Installing the probe

Execute the command

curl -L https://gitee.com/naibahq/nezha/raw/master/script/install.sh -o nezha.sh chmod +x nezha.sh sudo CN=true ./nezha.sh Enter the corresponding information according to the prompts. It should be noted that Gitee's login account is Account B 4zwsrt34xsi107.png

Next, open port 8008 5555 in the server firewall and server security groups respectively. Otherwise, I can't access it.

Next, visit ip:8008 and you will see the page.

Login the background

After entering the home page, click Login. Enter the information of account B and log in to Gitee. When the authorization page appears, click Authorization.u3zoqexwp5d108.png

Click to add a new server, the configuration is as follows0il1tqkwiz4110.png

Click the Settings page to configure the server domain name/IP ykglqbr1jmo111.png

Add client (Agent)

Enter the panel background, select the icon according to the system type and copy it, and follow with one click.c24m0onssv4112.png

Or access the following command to download the installation script to the local area. Then install it manually.

curl -L https://gitee.com/naibahq/nezha/raw/master/script/install.sh -o nezha.sh chmod +x nezha.sh sudo CN=true ./nezha.sh 2iuwidfyjhr113.png

Also note that you can open the relevant ports.hhu35yrcnaj114.png

After the configuration is completed, the effect is as followscwhkrlrylgx115.png

Configure domain name and proxy

If you have an available domain name, you can parse the current domain name. After the parsing is completed, the reverse proxy is configured as follows:

location /

{

proxy_pass http://127.0.0.1:8008;

proxy_set_header Host $host;

}

location /ws

{

proxy_pass http://127.0.0.1:8008;

proxy_http_version 1.1;

proxy_set_header Upgrade $http_upgrade;

proxy_set_header Connection 'Upgrade';

proxy_set_header Host $host;

}