Why I Check Client Identity Before Turning Protection On

●3 ●68 ●201
calendar_today • schedule7 min read

I do not turn protection on until I can name the address each hop will treat as the client. The question that usually forces that pause is how to preserve the real client IP with Proxy Protocol. It is a fair question for any reverse proxy. It is a bad reason to flip a switch the documents in front of me do not describe.

SafeLine is a self-hosted web application firewall. The product introduction says it sits in front of the application as a reverse proxy: clients pass through it, and it filters and monitors HTTP traffic before that traffic reaches the app. Listed attack classes include SQL injection, XSS, code injection, OS command injection, CRLF injection, LDAP injection, XPath injection, RCE, XXE, SSRF, path traversal, backdoor, brute force, HTTP flood, and bot abuse. Core capabilities listed there are defenses for web attacks, proactive bot abused defense, HTML and JS code encryption, IP-based rate limiting, and a web access control list (https://docs.waf.chaitin.com/en/home). The application guide adds the path detail: SafeLine is developed on nginx, receives traffic for the original site, cleans malicious requests, and forwards the remaining traffic to the upstream (https://docs.waf.chaitin.com/en/GetStarted/AddApplication).

That path change is the whole client-IP problem. After the cutover, visitors connect to SafeLine. The origin accepts connections from the WAF hop, not directly from the public client the way it did yesterday. Logs, allow rules, fraud checks, and rate limits that key on the socket peer will see a different fact. I want that fact written down before DNS moves.

Proxy Protocol is how many load balancers carry the original address to the next hop. I checked the introduction, the deploy guide, and the add-application guide for a listener, a real-IP restore control, or a stated header contract. Those pages do not document one. I do not treat a missing control as an implied default, and I do not enable protection on the hope that a menu somewhere restores the visitor address. If an auditor, a billing job, or an abuse workflow requires the same client address the origin sees today, that requirement is still open.

A nearby setting makes the mistake easy. In the deploy environment file, MGT_PROXY is the number of console proxy layers. The deploy guide says it should be used only when configuring a proxy for the console, and that the default is 0, which means no proxy is configured (https://docs.waf.chaitin.com/en/GetStarted/Deploy). That field is about reaching the management UI. It is not evidence that application traffic preserves the real client IP, and it is not a Proxy Protocol switch. I leave it at the documented default unless the console itself sits behind extra proxies.

IP-based rate limiting is why I refuse to leave identity as a follow-up ticket. The introduction describes rate limiting as a way to throttle traffic that exceeds defined limits, including denial-of-service patterns, brute-force attempts, traffic surges, and other abuse. A limit is only as fair as the key it uses. If many real users collapse into one address, a threshold can punish a crowd. If SafeLine and the origin disagree about who the client is, an allow in one place and a block in the other looks like a random outage. The web access control list raises the same question, even though these pages do not spell out every match field. I do not turn those controls on until I know which address they will observe.

This is the checklist I finish before the first protected request. Each line needs a written answer, not a nod.

Path. Can this app be published through SafeLine as an HTTP or HTTPS reverse proxy? On the Applications page the required fields are domain, listen port, and upstream. For HTTPS, the SSL option is part of that dialog (https://docs.waf.chaitin.com/en/GetStarted/AddApplication). I do not invent extra listener modes to satisfy Proxy Protocol.

Cutover. After those fields are saved, the domain has to resolve to the SafeLine server before users hit the protected path. I do not start that DNS change until the rollback pointer is known. Turning protection on is the moment public traffic moves, not the moment the container is up.

Identity. Which address will the origin log after the hop exists? Which address will SafeLine use for IP-based rate limiting and for access decisions? If I cannot answer both, protection stays off. I do not fill the gap with Proxy Protocol, a forwarded-header guess, or any restoration method these guides do not describe.

Application dependence. Do sessions, audit logs, geographic rules, or fraud checks require the original visitor address at the origin? If they do, I need a design I can test without an undocumented feature. If they do not, I record that the origin may see the WAF hop, and I tell on-call that a new source address is expected, not an incident.

Visitor gates. Captcha challenge is documented as a bot gate. Authentication challenge, when turned on, requires a password or the visitor is blocked. Dynamic protection, when turned on, encrypts HTML and JS on each visit (https://docs.waf.chaitin.com/en/home). For the first hour I keep every optional gate off unless I already have a reason and a test user. A failed login is easier to diagnose when it is not mixed with a challenge page and a client-IP surprise.

Host fit. The deploy guide requires Linux on x86_64 or arm64, Docker 20.10.14 or newer, Docker Compose 2.0.0 or newer, and at least 1 CPU core, 1 GB of memory, and 5 GB of disk. The CPU must support ssse3. On ARM, that same guide says a Pro license is required for SafeLine to work properly, and the Personal Edition is not supported. It also warns that the LTS line is no longer maintained starting from 9.1.0-LTS on 14 August 2025, and it recommends moving to the latest version (https://docs.waf.chaitin.com/en/GetStarted/Deploy). I confirm the host against those constraints before I advertise the new path. A license or architecture mismatch is not something I want to discover after DNS.

Proof. I keep the documented test cases for SQL injection, XSS, path traversal, code injection, and XXE, with my own domain substituted for the example host. A working defense shows the blocking page. The console attack list should contain the event, and the detail view is where I confirm what was blocked (https://docs.waf.chaitin.com/en/GetStarted/AddApplication). I run those requests only against an application I am allowed to test. A block page in a lab does not replace a clean visit from a real client network, so both checks stay on the list.

Rollback. The fast safety control is DNS back to the previous origin. The documented stop path is in the SafeLine directory: docker compose down. Removing the directory is only for a full uninstall, not for a client-IP mismatch (https://docs.waf.chaitin.com/en/GetStarted/Deploy). I write those two actions down before the cutover so nobody improvises under pressure.

Console access is part of the same plan, not a separate project. The deploy guide puts the web console at https://<safeline-ip>:9443/ and shows the initial admin password from docker exec safeline-mgt resetadmin. I want that login working, and the checklist answers stored outside the console, before any public name points at the WAF.

If the identity line fails, I stop. I do not try an undocumented Proxy Protocol setting to see what happens. I can still protect an application that does not depend on the original socket address, once IP-based controls have been reviewed against the address SafeLine will actually observe, and once a tested block page is an acceptable result for a malicious request. I cannot tell an operator that the real client IP is preserved until a documented behavior, tested on this deployment, says so.

That pause is the decision. A WAF in front of the app changes who speaks to the origin. Rate limits, access decisions, and incident timelines inherit the change. I would rather delay protection than ship a reverse proxy whose client address I cannot explain.

Does SafeLine document Proxy Protocol for the real client IP?

Not in the introduction, deploy guide, or add-application guide used for this decision. Those pages describe a reverse proxy and, separately, MGT_PROXY for console proxy layers. They do not describe Proxy Protocol as a way to preserve the visitor address. I plan as if that integration is unavailable.

Why does the client address matter before protection is on?

SafeLine moves onto the request path as a reverse proxy, and its listed capabilities include IP-based rate limiting and a web access control list. If the address used for those decisions is a shared hop rather than the visitor, limits and allow rules can group unrelated users. I want that risk named before DNS moves.

What do I set on the application before the cutover?

On the Applications page I set domain, listen port, and upstream. For HTTPS I enable the SSL option in that same dialog. I do not point the public domain at the SafeLine server until the identity and rollback answers are written down (https://docs.waf.chaitin.com/en/GetStarted/AddApplication).

How do I confirm that blocking works?

The application guide gives sample requests for SQL injection, XSS, path traversal, code injection, and XXE. A successful defense shows the blocking page, and the console attack list should show the event with a detail view. I run those checks only on a site I am authorized to test, and I also complete one ordinary visit from a real client network.

What if the origin must keep today's client IP?

Then I do not turn protection on under the assumption that Proxy Protocol, or any other restoration method, is available. These documents do not establish that behavior. Either I have a documented design I have already tested, or I leave the cutover for an application that can accept the WAF hop.


SafeLine has surpassed 700,000 installations worldwide as of September 30, 2026. SafeLine Pro annual promotional pricing is $650-$880, compared with the regular $1,000 per year.

Want more #checklist & #reverseproxy deep dives?

Join 6,182+ developers sharing real benchmarks, code breakdowns, and projects. Free forever.

More Posts

How to Preserve the Real Client IP with the PROXY Protocol

Muzilla - Nov 4

Why I Run a Checklist Before Turning HTTPS Protection On

Lia - Nov 3

Why I Use an Exit Checklist Before Turning Protection On

Lia - Oct 31

Why I Check Upstream Reachability Before Turning Protection On

Lia - Nov 4

Why I Wait to Turn Protection On Until the HTTPS Upstream Path Is Clear

Lia - Nov 5
chevron_left
3.8k Points • 272 Badges
164Posts
0Comments
1Connections
Homelab operator. Security tools. Self-hosted everything. Open source.

Related Jobs

View all jobs →

Commenters (This Week)

7 comments
1 comment
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!