Overview
The problem is rarely that the traffic is hard to identify. It is that identifying it at all costs more than you have left, because by the time a userspace process sees a packet the kernel has already allocated for it.
Access rules are enforced by Hillock at the XDP hook, which runs in the driver before routing and before a socket buffer exists. That is the cheapest drop a Linux host can perform, and it answers one question only: is this source allowed to talk to me at all.
When you see this
- The host saturates before the application has refused anything.
- Most of the flood comes from sources that repeat, or that threat intelligence already lists.
- The packets are trivial to identify; processing them is what you cannot afford.
Steps
- 01
Install the threat feed and let the firewall pick its backend
Threat detection distributes known-bad sources as a database the agent installs into kernel maps. ASN and country are resolved on the platform side and arrive already expanded, so the datapath never does a lookup.
/etc/synapse/config.yaml firewall: mode: "auto" # auto, xdp, nftables, iptables, none platform: threat: enabled: true - 02
Check which backend is actually enforcing
auto picks XDP where the kernel supports it and falls back to nftables, then iptables. The rule you wrote does not change, only the machinery under it.
DecisionIs the host running XDP?Yes Drops happen in the driver, before routing. Carry on.
No XDP needs a driver that supports it and a kernel with BTF. nftables and iptables still drop early, but not at driver level: plan for a supported NIC and kernel.
- 03
See what the kernel holds
When a rule appears not to work, check what is really loaded. The flag reads the pinned maps and exits; it needs root and does not need Synapse running.
Rules the kernel is enforcing sudo synapse --show-firewall-rules json - 04
Add the sources the feed does not know
Put repeat sources on an access rule: an address or CIDR, an ASN or a country. They land in the same kernel maps as the feed.
- 05
Separate a layer 7 flood
A slow flood of well-formed requests from unremarkable addresses passes XDP untouched. That one has to be handled at the proxy, by fingerprint and rate.
DecisionAre the packets well-formed requests from addresses nobody has flagged?Yes Treat it as a bot problem: follow the bots and credential stuffing playbook.
No It is a volumetric flood. Keep it at the access rules.
Common mistakes
- Expecting an address list to stop a distributed attack from addresses you have never seen.
- Assuming XDP when the host has fallen back to nftables or iptables.
- Restarting the agent in the middle of an attack: the XDP link is pinned and re-attachment is not instantaneous.
Escalate when
- The flood is genuinely novel and larger than the link: that needs upstream capacity, not a host rule.
Where this stops working
- An address list cannot stop a distributed attack from addresses you have never seen. It absorbs known-bad and repeat sources cheaply.
- Layer 7 floods look like valid traffic here and have to be handled at the proxy.