DEV Community

Public Origin vs Restricted Origin: Two Ways to Place a WAF Against Automated Scanners

A public website can sit behind a WAF and still expose an unfiltered route to its application server. That matters when automated scanners probe for vulnerable endpoints: changing DNS does not necessarily remove the origin server's public address.

If you are deciding how to block automated vulnerability scanners on a public site, compare two deployments: a WAF in front of an origin that remains publicly reachable, and a WAF in front of an origin that accepts application traffic only through the intended proxy path. The difference is whether an attacker can bypass inspection.

Automated Probing Becomes an Access Attempt

An attacker can automate requests across many sites, looking for exposed administration pages, forgotten application components, traversal weaknesses, or injection opportunities. AI-assisted tooling can help generate request variations, but defenders should judge observable behavior rather than assume they can identify how a request was produced.

A scan might appear as repeated requests to unrelated paths, unusual query strings, or bursts of errors. Those signals warrant investigation; they do not establish a successful compromise. An authorized security scanner can produce similar traffic.

The higher-risk transition occurs when probing finds a reachable, vulnerable component. Exploitation could create an initial foothold, including the ability to execute commands or deploy a web shell. Blocking a recognizable probe is useful, but leaving an alternate route to the same component undermines that protection.

A: Put SafeLine in Front, Leave the Origin Public

SafeLine's documented application setup uses an HTTP/HTTPS reverse proxy. You configure the application's domain, listening port, and upstream address, then resolve the domain to the SafeLine server's IP address. SafeLine receives requests and forwards accepted traffic to the application. See the official application configuration guide.

This arrangement puts normal domain traffic through inspection. However, DNS routing alone does not enforce that every application request takes that route. If the origin still accepts connections from arbitrary Internet clients, an attacker who discovers its address may try contacting it directly.

Name-based hosting can also require the expected hostname before the application responds, so checking only the origin's default page is insufficient. The evidence to examine is a mismatch between paths: requests appearing in origin access logs without corresponding requests at the WAF. Correlate timestamps, methods, paths, and request identifiers where available. Account for health checks and internal traffic before calling the mismatch a bypass.

This deployment can serve as an intermediate migration state, but it leaves an additional access path to investigate and control.

B: Put SafeLine in Front, Restrict Origin Access

The second choice adds a network boundary: configure the origin's firewall, security group, or private network so that application ports accept traffic only from the intended proxy infrastructure and explicitly required operational systems. This restriction is an infrastructure decision, not a SafeLine feature promised by the supplied documentation. Its purpose is to make direct requests fail before they reach the application.

Before applying it, identify the actual source addresses the origin sees. Include legitimate health checks and deployment dependencies. Test the restriction with a rollback path available so that an incorrect allowlist does not interrupt service.

Verify three outcomes:

  • The public hostname still serves normal application requests through SafeLine.
  • Direct origin requests from an unauthorized external network fail, including requests using the application's expected hostname.
  • Necessary monitoring and operational access still work.

Check both IPv4 and IPv6 where enabled, plus alternate application ports. A restricted primary listener does not cover a forgotten secondary listener.

Choose Controls After Closing the Bypass

SafeLine documents web attack defenses, IP-based rate limiting, CAPTCHA challenges, and authentication challenges in its official overview. These controls address different decisions. Attack filtering addresses malicious request content. Rate limiting addresses excessive request volume, but distributed scanners can spread requests across addresses. CAPTCHA introduces an interactive requirement that can disrupt legitimate automated clients. Authentication challenges require visitors to enter a password, which changes access expectations for a public site.

Do not assume a scanner label is enough to choose a response. Review request details, affected endpoints, legitimate client behavior, and application impact. The application guide documents viewing the attack list and opening individual attack details in the console.

Does pointing DNS at SafeLine block direct origin access? No. DNS directs clients toward an address; origin access restrictions determine whether another route remains usable. Verify both separately.

Should every scanner receive a CAPTCHA? Not automatically. Browser visitors and API clients have different requirements. Test legitimate journeys before introducing an interactive challenge, and do not assume every automated request is hostile.

What evidence should trigger an incident investigation? Investigate unexpected successful responses from sensitive endpoints, suspicious application changes, or signs of command execution. A blocked request records an attempted action; it does not prove either compromise or complete protection.

Which placement should a public site choose? Prefer a restricted origin when the architecture supports it. Keep patching, remove unnecessary endpoints, and verify that intended traffic crosses the WAF. Closing bypass routes makes inspection meaningful, while vulnerability remediation reduces what a scanner can exploit.

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.

Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.