DEV Community

禾
禾

Posted on

DNS-Only Cutover vs Restricted Origin: Two WAF Placements After a Breach

After an internet-facing application breach, changing DNS to point at a reverse proxy can feel like containment. But if attackers can still reach the original server, they can keep using the path they already know.

The first decision is whether the WAF becomes an additional route or the enforced entry point. That distinction should lead your reverse proxy WAF priorities after an internet facing application breach, especially when investigating vulnerability exploitation or a possible web shell.

This article compares two configurations: a DNS-only cutover that leaves the origin publicly reachable, and a restricted origin that accepts application traffic only through the intended proxy path. The incident examples below are investigative possibilities, not claims about a particular breach.

Choice A: Change DNS and leave the origin reachable

In this configuration, the public hostname resolves to the WAF, which forwards requests to the application. The original server still accepts connections from the Internet.

SafeLine's documented application setup uses a domain, listening port, and upstream address, followed by resolving the domain to the SafeLine server's IP address. SafeLine acts as an HTTP/HTTPS reverse proxy that receives requests and forwards filtered traffic to the application. See the official application configuration guide.

A DNS-only cutover can make initial routing validation easier. You can check certificates, application responses, and critical workflows before enforcing network restrictions. Its limitation is that DNS changes do not revoke access to an address an attacker already possesses.

An attacker who exploited a vulnerable upload handler might continue sending requests directly to the origin IP, supplying the application's hostname where needed. If a web shell remains accessible, the attacker may invoke it without traversing the new WAF.

The defender might see requests in origin access logs that have no corresponding proxy record. That discrepancy deserves investigation, but it is not proof by itself: health checks, logging gaps, and other legitimate routes can also explain it.

Concrete checks include:

  • Test direct origin access from an authorized external system using the expected hostname and TLS server name.
  • Inventory IPv4 and IPv6 addresses, alternate listeners, old load balancers, and secondary hostnames.
  • Compare proxy and origin records using timestamps, paths, methods, and request identifiers where available.
  • Confirm which monitoring and administrative services legitimately require separate access.

Treat this configuration as a transitional state with an owner and an explicit completion condition.

Choice B: Restrict the origin to the intended proxy path

Here, DNS sends clients to the WAF, and network controls restrict application ingress at the origin to the approved proxy infrastructure. Management access follows a separately controlled route.

This restriction is a deployment decision implemented through your network controls. It should not be assumed to happen automatically when adding an application to SafeLine.

The practical advantage is coverage: requests aimed at the public application must follow the inspected route. An attacker who knows the old origin address should no longer be able to use it as an alternate application entrance.

The operational tradeoff is that incomplete dependency mapping can interrupt legitimate traffic. Before enforcing restrictions, identify health checks, deployment probes, partner callbacks, and any services that connect directly. Decide which should traverse the WAF and which need a narrowly scoped exception.

Acceptance checks should establish both sides of the boundary:

  1. A normal public request reaches the application through the WAF.
  2. An authorized external test cannot reach the application directly at its origin addresses and ports.
  3. Approved health checks and critical business workflows still succeed.
  4. A rollback procedure preserves the ingress restrictions or explicitly documents any temporary exposure.

SafeLine documents an attack list and a detail view for inspecting detected requests. Those records can support validation of the inspected route, but they do not establish that the origin has no other entrance. See the official configuration and verification instructions.

What neither choice fixes

A WAF placement change does not remove a web shell, invalidate stolen sessions, or repair the exploited application.

Preserve relevant evidence before rebuilding or removing suspicious files. Investigate unexpected executable uploads, changed application files, unusual child processes, new persistence mechanisms, and outbound connections. Patch the vulnerable component or disable the affected function, and rotate exposed credentials according to the investigation's findings.

SafeLine documents web attack filtering, IP-based rate limiting, and access controls in its product overview. These controls can contribute to reducing further malicious requests. They should accompany host and application remediation, with validation based on the actual entry point.

For a breached application, prefer the restricted-origin configuration as the intended end state. Use DNS-only routing to validate the transition when necessary, while recognizing that a reachable origin leaves an alternate path.

FAQ

Is changing DNS enough to contain application exploitation?

No. DNS directs clients that use the hostname; it does not prevent connections to a known origin address. Verify direct reachability independently and restrict application ingress where appropriate.

Does a WAF block prove the attacker lost access?

No. It proves that a particular request encountered a control. The attacker could retain a session, credentials, another entry point, or persistence on the server. Investigate those possibilities separately.

Should we immediately challenge every request?

First validate the impact on your clients. SafeLine documents CAPTCHA and password-based authentication challenges in its overview. Browser interactions, APIs, and machine callbacks have different requirements, so broad changes need workflow testing.

What evidence supports completing the cutover?

Use a combination of successful business workflow tests, verified denial of direct origin access, expected proxy-to-origin traffic, and remediation evidence for the original compromise. Quiet WAF logs alone are insufficient: traffic may be absent, bypassing inspection, or unrelated to the attack path.


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.

Top comments (0)