1Panel Install 雷池 WAF Detailed Tutorial

Water post water post, keep posting water posts :xhj14:

Recently, I decided to add a layer of protection to my server. So I naturally wanted to try the famous 雷池WAF.

雷池WAF needs to occupy ports 80 and 443, which conflict with the ports of my OpenResty. This requires some port modifications.

In the left‑hand menu, click:

应用商店

Find OpenResty and click:

卸载

Check:

强制卸载
删除备份
删除镜像

Enter:

OpenResty

Click:

确认

Next, reinstall OpenResty and modify its ports.

Change its HTTP port to:

8080

Change its HTTPS port to:

8443

After freeing ports 80 and 443, you can install 雷池WAF. Open the server’s SSH terminal and switch to root:

sudo -i

Run the 雷池WAF automatic installation script:

bash -c "$(curl -fsSLk https://waf-ce.chaitin.cn/release/latest/manager.sh)"

When the installation is complete, the username and password will be displayed—note them down. The default port is 9443, which needs to be allowed through the firewall.

In the left‑hand menu, click:

系统
防火墙

Click:

创建端口规则

Enter the port:

9443

Finally, click:

确认
``Open a browser and visit `http://<server public IP>:9443`. You can now log into the 雷池WAF dashboard. The first login will automatically initialize the admin account.

If you forget the password, run the reset command in the terminal:

```bash
docker exec safeline-mgt resetadmin
5 Likes

If OpenResty gives up ports 80 and 443, how can you still build a site :ac01:

You can build a website.

The external service ports remain the standard 80 and 443, which users are unaware of. However, in reality, the traffic passes through WAF security filtering before reaching the actual website application, which does not affect site building and also enhances security protection.

Is it that for building a site or anything, as long as it goes through ports 80 and 443, it will pass through a WAF and then go outbound?

“All inbound requests to your website go through the WAF, and then their responses are returned to the user via the WAF”, but this is a different matter from outbound traffic that the server initiates.

Got it. Learned again.

1 Like

Indeed, having multiple firewalls is safer, but it’s also a bit more troublesome :ac01:

The child got scared after being hit :xhj17:

I’ll just try it myself; I’m not scared before it’s been messed with :xhj21:

Thank you for sharing

Thank you for your selfless sharing~thumbs up~

Thanks for sharing. BTW, this isn’t watery enough, just a bunch of pure water…

Wow :hushed_face:

Thank you for sharing the tutorial, I’ll study it.

Thanks for sharing, you still need more protection when providing services.

Do not let hackers cross the boundary even a single step.

Thank you for the installation tutorial.

Is there a tutorial for installing AdguardDoH with 1panel? :xhj14:

Leichi WAF’s anti-crawling is quite powerful.