Protection

8 min readUpdated

What is remote DDoS protection?

Quick answer

Remote DDoS protection is mitigation for infrastructure you keep where it is: the provider's network receives the attack, filters it and forwards only clean traffic to your server or data centre. It comes in three forms: a reverse proxy for websites and APIs, switched on with a DNS change; a GRE or IP tunnel that delivers protected addresses to your machine for any protocol; and BGP announcement of your own prefix, always-on or diverted during an attack.

01What does remote DDoS protection mean?

It means the filtering happens on someone else's network, before traffic reaches the link into your server, while your hardware, host and addressing stay as they are. Against volumetric attacks that is the only arrangement that works: a flood larger than your uplink is lost before any firewall of yours sees a packet.

It differs from DDoS-protected hosting, where you rent a machine inside a filtered network, and from on-premise appliances, which only filter what fits through your pipe. Nor is it a null-route, where a host drops all traffic to your address to protect itself (the BGP BLACKHOLE community, RFC 7999), finishing the attacker's job.

02How is remote DDoS protection delivered?

There are three delivery models. They differ in the layer they work at, what you need to bring, and how clean traffic gets back to you.

  • Reverse proxy (Layer 7): DNS points your hostname at the provider, which terminates HTTP and TLS, filters requests and opens its own connections to your origin. Covers websites and APIs; see what a reverse proxy is
  • GRE or IP tunnel (Layer 3/4): the provider gives you protected addresses, or routes yours, and delivers filtered packets to your machine inside a tunnel. Covers any protocol, including UDP game and voice traffic; see what GRE tunnelling is
  • BGP with your own prefix (Layer 3/4): the provider announces your address block, scrubs traffic for it and hands the clean part back over a tunnel or a direct connection. Covers whole networks; see what BGP is

03Reverse proxy vs GRE tunnel vs BGP: comparison

Choose by protocol first: anything that is not HTTP rules out the reverse proxy, and less than a /24 rules out announcing your own prefix. Layer 3/4 vs Layer 7 explains why the layers need different tools.

Reverse proxyGRE / IP tunnelBGP, own prefix
Switched on byChanging DNS recordsConfiguring a tunnel on your server or routerThe provider announcing your prefix
You needA domainA machine that can terminate GREAn ASN, at least a /24 (IPv4) or /48 (IPv6), BGP routers
Protocols coveredHTTP, HTTPS, WebSocketAnything carried over IPAnything carried over IP, for the whole network
Visitor IP at your serverIn a header such as X-Forwarded-For, or via the PROXY protocolPreservedPreserved
LatencyAn extra hop, often offset by cachingA detour via the provider plus encapsulationA detour via the provider; none in normal times if on-demand
ExposureOrigin hidden only if firewalled to the proxyTunnel endpoint address must stay privatePrefix is public; traffic is diverted
Return trafficThe proxy answers the clientBack through the tunnelOften direct, over your own transit
Common pricing basisPer site or planPer protected IP and clean bandwidthPer prefix, commitment and clean bandwidth

04Reverse proxy: websites and APIs

The quickest model to deploy: change DNS and traffic flows through the provider once the old record's TTL expires. Because the proxy terminates HTTP, it can inspect requests, challenge bots, cache pages and absorb HTTP floods that look like ordinary traffic.

Its weakness is the origin. If the real address still answers, attackers skip the proxy, so firewall the origin to the provider's published ranges and follow how to hide your origin IP. Your application also sees the proxy as the client, so it must restore the visitor's address from the proxy's header, trusting it only from the proxy's ranges.

05GRE tunnel: any protocol, your own machine

The provider wraps each clean packet in an outer IP header addressed to your machine. GRE (RFC 2784) adds a 4-byte header to the 20-byte outer IPv4 header, so every packet grows by 24 bytes; the optional key field from RFC 2890 adds 4 more. Your server unwraps the packet and sees the original, real source address included.

Two details matter. Replies normally go back through the tunnel, because your own upstream drops packets with source addresses it did not assign to you (ingress filtering, BCP 38, RFC 2827). And the tunnel endpoint is your server's real address: if it leaks, it can be flooded directly, so use an endpoint address that runs no public service and appears in no DNS record.

MTU worked example (IPv4 in IPv4)Bytes
Physical link MTU1500
Outer IPv4 header−20
GRE header without options−4
Tunnel MTU1476
Inner IPv4 and TCP headers−40
TCP MSS inside the tunnel1436
With a 4-byte GRE key: tunnel MTU / MSS1472 / 1432
MSS clamping on a router that terminates the tunnel (nft 1.0.6; IPv4 clamping tested through a GRE tunnel between network namespaces)
#!/usr/sbin/nft -f
# On a router that terminates the tunnel for servers behind it:
# rewrite the MSS in forwarded SYNs to fit the tunnel's MTU (1476).
table inet tunnel_mss
delete table inet tunnel_mss

table inet tunnel_mss {
    chain forward {
        type filter hook forward priority mangle; policy accept;
        oifname "gre1" tcp flags syn tcp option maxseg size set rt mtu
        # 1476 - 40 (IPv4 + TCP) = 1436; 1476 - 60 (IPv6 + TCP) = 1416
        iifname "gre1" meta nfproto ipv4 tcp flags syn tcp option maxseg size set 1436
        iifname "gre1" meta nfproto ipv6 tcp flags syn tcp option maxseg size set 1416
    }
}

06BGP: protecting your own prefix

If you run your own network, the provider can announce your prefix so the internet sends its traffic to their scrubbing sites. You need an autonomous system number and at least a /24 of IPv4 or a /48 of IPv6, because more specific prefixes are generally filtered; why a /24 is the minimum explains the rule. If your prefix has RPKI ROAs, they must cover the origin AS and prefix length the provider will announce, or validating networks treat it as invalid (RFC 6811).

Always-on means the provider announces the prefix permanently and every packet is filtered. On-demand means you announce it yourself and divert to the provider when flow telemetry shows an attack. That avoids the detour in peacetime but leaves a gap before the new route takes effect, and an unrehearsed switch can look to others like a BGP hijack.

Clean traffic returns over GRE, a cross-connect in a shared data centre, or a private VLAN at an internet exchange. Outbound traffic usually leaves through your own transit, since the prefix is yours.

07Questions to ask a remote DDoS protection provider

Marketing pages quote capacity; what keeps you online is operational. A good provider answers these directly.

QuestionWhy it mattersWarning sign
How is clean traffic delivered to me?GRE, cross-connect or exchange VLAN changes latency, MTU and failure modesA vague answer, or one option that does not fit you
What MTU and MSS should I set?Wrong values break large transfers silentlyNo mention of MSS clamping
Is UDP filtered, or dropped during attacks?Games and voice die if UDP is blackholedTalk of capacity instead of an answer
How do you detect tunnel failure, and how fast do you fail over?Keepalives or BFD decide recovery timeManual failover only
Always-on or on-demand, and what is the time to mitigate?On-demand leaves a gap at the start of each attackNo measured figure
How is billing calculated during an attack?Some contracts bill attack or burst trafficOverage charges on dirty traffic
Can I see and change filtering rules?You know your protocols better than the providerNo visibility at all
Is IPv6 covered the same way?An unprotected IPv6 address is a bypassIPv6 is on the roadmap
What happens when an attack exceeds your capacity?Null-routing at the limit is commonA silent null-route without notice

08What remote DDoS protection cannot do

It protects the path it controls and nothing more. An address outside that path, such as an old server, a mail host, a forgotten IPv6 address or the tunnel endpoint itself, can still be flooded directly. A Layer 3/4 service does not inspect HTTP, so an application-layer flood passes straight through a tunnel unless the provider also proxies the web traffic. No network filter fixes a vulnerable application or a credential-stuffing campaign using real logins.

Every model costs a detour, tunnel overhead where used, and dependence on the provider. For most targets that is a good trade, but measure steady-state latency rather than assuming it. GuardX's remote protection for websites and APIs works as a reverse proxy and is available now; GRE transit for other protocols is marked coming soon.

Questions

Frequently asked questions

Not for a reverse proxy, which only needs a domain, and not for a tunnel that uses the provider's protected addresses. You do need your own prefix and an autonomous system number for BGP-based protection, and the block must be at least a /24 for IPv4 or a /48 for IPv6, because longer prefixes are generally filtered on the internet.

Usually a little, because traffic detours through the provider's filtering site before reaching you; how much depends on where that site is relative to your users and server. A reverse proxy can offset it by caching, while on-demand BGP adds nothing in normal times but changes the path suddenly when an attack starts.

Sometimes. GRE is IP protocol 47, not TCP or UDP, so routers performing NAT, including carrier-grade NAT on many consumer lines, often cannot pass it. A public address on a router or server that can terminate GRE is the practical minimum. If you cannot get one, ask whether the provider offers a tunnel type carried over UDP instead.

Always-on is better for anything latency-sensitive or frequently attacked, because there is no switch-over at the start of each attack. On-demand suits rarely targeted networks that want to avoid the detour in normal times, provided detection and route changes are rehearsed. Its weakness is the gap before the diversion takes effect.

With a reverse proxy, responses go back through the proxy. With a tunnel using the provider's addresses, replies should return through the tunnel, because your normal upstream will drop packets sourced from addresses it did not assign to you. With BGP and your own prefix, outbound traffic can leave through your own transit while only inbound traffic is diverted.

Sources

Sources and verification

MSS-clamping ruleset syntax-checked with nft 1.0.6 and loaded on a router namespace forwarding between a GRE tunnel (MTU 1476) and a server namespace: IPv4 SYN and SYN-ACK options of 1460 arrived as 1436 in both directions, and stayed 1460 without the ruleset. The IPv6 line was syntax-checked only. Debian 12, October 2026. MTU figures are calculated from the header sizes in RFC 2784 and RFC 2890.

  1. 01RFC 2784: Generic Routing Encapsulation (GRE) · IETF
  2. 02RFC 2890: Key and Sequence Number Extensions to GRE · IETF
  3. 03RFC 4459: MTU and Fragmentation Issues with In-the-Network Tunneling · IETF
  4. 04RFC 7454: BGP Operations and Security (prefix length, section 6.1.3) · IETF
  5. 05RFC 6811: BGP Prefix Origin Validation · IETF
  6. 06RFC 2827 (BCP 38): Network Ingress Filtering · IETF
  7. 07RFC 7999: BLACKHOLE Community · IETF
  8. 08Mangling packet headers (TCP MSS clamping) · nftables wiki

Last updated