You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good afternoon!
Prefixd currently lacks the ability to implement a Flowspec "redirect to ip" (ip nexthop) action—for instance, to forward incoming traffic to one's own scrubbing solution, such as Tempesta xFW.
I noticed that this is mentioned in your roadmap; am I correct in understanding that you plan to add this feature?
In addition to the "redirect to IP" option itself, it might also be necessary to implement the functionality described in RFC 8955 (Section 4.2.2.2) / RFC 8956 (Section 3.2) regarding "Source Prefix."
Having the ability to route a portion of traffic—specifically for filtering purposes—via Flowspec would be highly beneficial.
Two deliberate limits: the target comes from the configured profile, not an arbitrary API value; and detector/playbook actions still cannot request redirect. prefixd only controls the FlowSpec intent — it does not configure Tempesta, the VRF or the return path, so please qualify the redirect action and forwarding on your router/scrubber.
I’ve seen the changes; it’s fairly clear how it was implemented. The only point is the verification—that might be a bit tricky, but I’ll do my best to check it.
Thanks for the diagram, that makes the use case clear. Today's diversion is deliberately one-directional: a single host-destination rule toward a configured ingress peer set, with the return path kept outside the redirect. Your scheme needs three things prefixd doesn't have yet: a TCP-flags match, a return-direction rule keyed on the victim as source, and a second rule exported only to the client-side router, admitted and withdrawn together with the first. That's a design change rather than a config option, so I'm tracking it as a separate piece of work and will update here when there's something to test. For verifying the current inbound-only redirect, a received FlowSpec route on the router isn't enough on its own; check the router's installed FlowSpec state and counters, and a canary flow through the scrubber.
A global IP-target scrubber profile can carry an optional return_leg. For a TCP diversion, prefixd then admits a pair of rules as one unit, matching your example:
Router B: source 203.0.113.1/32, tcp, tcp-flags syn-ack → redirect 192.0.2.99 (the new return leg, with no destination component)
scrubber:
profiles:
- id: scrubber-arevision: qualified-v2ipv4_target: 192.0.2.99router_peers: [<router A peer>]policy_binding: ingress-only-v2max_active: 10# a pair counts as two rules, so at least 2# ...other fields as beforereturn_leg:
router_peers: [<router B peer>]policy_binding: client-side-only-v1export_community: "64496:100"tcp_flags: syn_ack # optional; omit it to divert all of the victim's TCP from those ports
The return leg carries export_community, and that is what your rustbgpd export policy uses to send it only to router B and keep it away from router A. The guide has a ready-made inbound-only / return-only policy example. Both legs share one lease, one readiness state and one latch. A diversion only shows active once both legs are confirmed, and a failed, missing or mis-exported leg withdraws both. UDP and other protocols still get the inbound leg only. TCP flags are also available on ordinary manual rules now (guardrails.allow_tcp_flags_match).
On verification, which you mentioned: prefixd's tests prove the control plane against rustbgpd 0.81.0 and 0.82.0. That covers the exact rule bytes, read-back, and the community keeping the return leg to router B only. They can't prove what your routers do. Before relying on it, I'd check:
that router B accepts and installs a FlowSpec rule with no destination component (receivers differ under RFC 8955 §6 / RFC 9117);
installed-rule counters on both routers while a canary TCP connection completes its handshake through the scrubber;
that the scrubber's clean output re-enters outside each leg's ingress scope, so return traffic isn't redirected again;
if you also run other destination-keyed rules, which rule router B prefers when they overlap.
The readiness monitor report needs a return_leg object for these profiles (binding, export isolation and a canary), which is a natural place to automate those checks.
Activity
aztec102 commentedon Oct 22, 2026
In addition to the "redirect to IP" option itself, it might also be necessary to implement the functionality described in RFC 8955 (Section 4.2.2.2) / RFC 8956 (Section 3.2) regarding "Source Prefix."
Having the ability to route a portion of traffic—specifically for filtering purposes—via Flowspec would be highly beneficial.
lance0 commentedon Oct 22, 2026
Will work on these as soon as I can!
aztec102 commentedon Oct 23, 2026
Tested the functionality with the Source Prefix specified – it works perfectly!
aztec102 commentedon Oct 27, 2026
@lance0 I’m not quite sure why the issue was closed, since, as I understand it, the redirect hasn’t been added yet?
lance0 commentedon Oct 27, 2026
Sorry about that I think a PR auto closed it. @aztec102
lance0 commentedon Nov 8, 2026
Just and update @aztec102 I am working hard to get a major update out soon.
aztec102 commentedon Nov 9, 2026
@lance0 Thanks, I’m following the news )
lance0 commentedon Nov 10, 2026
Thanks for following this one — v0.25.0 is out: https://github.com/lance0/prefixd/releases/tag/v0.25.0
Quick summary for your two asks:
guardrails.allow_src_prefix_match: true(you already confirmed it works).scrubberprofile withipv4_target/ipv6_target, destinations and router peers, then create the diversion through the admin API, CLI or dashboard. See https://github.com/lance0/prefixd/blob/v0.25.0/docs/how-to/scrubber-diversion.mdTwo deliberate limits: the target comes from the configured profile, not an arbitrary API value; and detector/playbook actions still cannot request redirect. prefixd only controls the FlowSpec intent — it does not configure Tempesta, the VRF or the return path, so please qualify the redirect action and forwarding on your router/scrubber.
VPN-scoped redirect-to-VRF is also available on rustbgpd 0.82.0. There is no new database migration; upgrade steps are here: https://github.com/lance0/prefixd/blob/v0.25.0/docs/how-to/upgrading.md#v0240--0250
If you specifically need detector-triggered redirect, that piece is still open — happy to keep this issue focused on it.
aztec102 commentedon Nov 12, 2026
I’ve seen the changes; it’s fairly clear how it was implemented. The only point is the verification—that might be a bit tricky, but I’ll do my best to check it.
aztec102 commentedon Nov 12, 2026
Ideally, of course, we would get a scheme like this
lance0 commentedon Nov 12, 2026
Thanks for the diagram, that makes the use case clear. Today's diversion is deliberately one-directional: a single host-destination rule toward a configured ingress peer set, with the return path kept outside the redirect. Your scheme needs three things prefixd doesn't have yet: a TCP-flags match, a return-direction rule keyed on the victim as source, and a second rule exported only to the client-side router, admitted and withdrawn together with the first. That's a design change rather than a config option, so I'm tracking it as a separate piece of work and will update here when there's something to test. For verifying the current inbound-only redirect, a received FlowSpec route on the router isn't enough on its own; check the router's installed FlowSpec state and counters, and a canary flow through the scrubber.
lance0 commentedon Nov 12, 2026
Your diagram is now supported in v0.26.0: https://github.com/lance0/prefixd/releases/tag/v0.26.0
A global IP-target scrubber profile can carry an optional
return_leg. For a TCP diversion, prefixd then admits a pair of rules as one unit, matching your example:destination 203.0.113.1/32, tcp → redirect 192.0.2.99(the existing inbound leg)source 203.0.113.1/32, tcp, tcp-flags syn-ack → redirect 192.0.2.99(the new return leg, with no destination component)The return leg carries
export_community, and that is what your rustbgpd export policy uses to send it only to router B and keep it away from router A. The guide has a ready-madeinbound-only/return-onlypolicy example. Both legs share one lease, one readiness state and one latch. A diversion only showsactiveonce both legs are confirmed, and a failed, missing or mis-exported leg withdraws both. UDP and other protocols still get the inbound leg only. TCP flags are also available on ordinary manual rules now (guardrails.allow_tcp_flags_match).Setup and details: https://github.com/lance0/prefixd/blob/v0.26.0/docs/how-to/scrubber-diversion.md#add-a-symmetric-return-leg
On verification, which you mentioned: prefixd's tests prove the control plane against rustbgpd 0.81.0 and 0.82.0. That covers the exact rule bytes, read-back, and the community keeping the return leg to router B only. They can't prove what your routers do. Before relying on it, I'd check:
The readiness monitor report needs a
return_legobject for these profiles (binding, export isolation and a canary), which is a natural place to automate those checks.Upgrading from 0.25.0 needs no migration: https://github.com/lance0/prefixd/blob/v0.26.0/docs/how-to/upgrading.md#v0250--0260. Before downgrading, withdraw any diversions on a
return_legprofile, because an older controller refuses to start while they are outstanding.If you get a chance to try it on your routers, I'd really like to hear how router B handles the destination-less rule.
aztec102 commentedon Nov 17, 2026
@lance0 Thank you very much for the added functionality; I will try testing it in the lab.
lance0 commentedon Nov 18, 2026
Sounds great. Eager to hear the feedback.