Juniper Protect-RE Filter Generator
Generate a Junos Routing Engine protection filter — the lo0 input firewall filter that every RE-bound packet passes through regardless of which interface or destination address it actually arrived on. Applied via unit <*> so it automatically covers every configured loopback unit — the default instance and any routing-instances/virtual-routers — not just lo0.0. Check the protocols you run, list trusted sources per protocol where it matters, and get a complete, correctly-ordered set command block ending in a logged catch-all discard. Runs entirely in your browser — nothing is sent anywhere.
Updated November 13, 2026
- New: every protocol that reads its hosts with
apply-path(BGP, MSDP, NTP, SNMP, DNS, RADIUS, TACACS+) can now take a list of addresses you type instead, or as well. They are written to a static prefix-list. The “Don’t use apply-path” button switches every protocol over at once. - Fixed: SNMP polling addresses are now checked, and IPv6 ones go into the IPv6 filter instead of producing an invalid IPv4 term.
Updated November 10, 2026
- RADIUS: CoA / Disconnect-Request (UDP/3799) and 802.1X / NAC servers. Thanks to J. Coke for the CoA catch.
- New: NETCONF with custom ports, IKE / IPsec for SRX, LDP, RSVP, PIM, IGMP / MLD, MSDP and RIP.
- Fixed: the BGP neighbor list now includes global peers as well as routing-instance peers.
apply-path prefix-list that dynamically pulls every configured protocols bgp group <*> neighbor <*> address — including inside routing-instances/virtual-routers — so the neighbor list can never drift out of sync with your actual BGP config. No manual address entry needed, or list the neighbors yourself below.family inet firewall filter can see it, so checking this only adds an explanatory comment to the output, not a real filter term. Protect IS-IS via interface-level authentication instead (set protocols isis interface <if> level 2 authentication ...).authentication-key on the sessions.apply-path prefix-list pulled from protocols msdp peer <*>. IPv4 only, as MSDP has no IPv6 form.security ike gateway ... address), the terms accept from any source. IKE then has to defend itself: use strong authentication and IKE rate limits. The tool warns you when this happens.DISCARD-ALL-COUNT. The zone's host-inbound-traffic system-services ike setting is separate and still has to allow IKE; this filter does not replace it.apply-path prefix-list pulled from system ntp server <*> (IPv4 and IPv6 servers) — no manual address entry needed, or list the servers yourself below.apply-path prefix-list pulled from snmp client-list <*> — your SNMP-layer poller restriction usually is the source list. Add any polling-only hosts below that aren't in a client-list.apply-path prefix-list pulled from system name-server <*>. Not a destination-port match, and no manual address entry needed (or list the servers yourself below).apply-path prefix-list pulled from system radius-server <*> (the servers used for admin login). Not a destination-port match, and no manual address entry needed (or list the servers yourself below).access radius-server, not system radius-server. Without this the replies from those servers are not matched by the source list.dynamic-request-port under access radius-server (default 3799).tcp-established, restricted via an apply-path prefix-list pulled from system tacplus-server <*>. TACACS+ is TCP-only (the UDP variant seen in some templates never carries it), so no UDP term is generated.0.0.0.0, which the anti-spoof term would discard. The server/relay term is therefore placed ahead of anti-spoof and accepts UDP/67 from any source — only tick it if this router really serves or relays DHCP.tcp-established and the cloud-side source port. Like Mist's own generated filter, these terms are not limited to particular source addresses — Mist's cloud IPs change and Juniper publishes hostnames, not an address list, so restricting by destination host belongs on your perimeter firewall.lo0 filter (yours showed protect_re in groups top). Run show configuration | display set | match lo0 first — two competing lo0 input filters is something to test in a lab, not on a live switch. Mist also needs DNS return traffic, so keep the DNS term checked.set system services netconf ssh port <n>). Untick the default if you have, and list the port(s) you really use. If NETCONF is carried over a port you already allow for SSH, you do not need this term at all.then next term), so this term never accepts anything by itself; packets over the limit are discarded.ttl 1 so only packets that are actually topologically arriving as a hop-probe match, plus a policer on both.33434-33534), names, or a comma-separated list.family inet6 filter — IPv4 and IPv6 don't share terms. This adds a second filter (<name>-V6) applied to the same lo0 interface, scoped to essentials only for now: anti-spoofing, Neighbor Discovery, and a catch-all discard. BGP, OSPF, NTP, DNS, RADIUS (including CoA), TACACS+, DHCPv6, Mist, LDP, RSVP, PIM, MLD, RIPng, IKE/IPsec, NETCONF, custom rules, and SNMP are all mirrored into it automatically if checked above, reusing the exact same apply-path prefix-lists as the IPv4 terms — one neighbor/server list covers both address families, nothing to duplicate or keep in sync (NTP gets a separate IPv6 list, because its <*.*> pattern only expands IPv4 addresses). MSDP has no IPv6 form and is not mirrored. The SNMP section's manual extra-host field is IPv4-only and is not mirrored here.fe80::/10) as a source, unlike the IPv4 term's treatment of 169.254.0.0/16 — OSPFv3 and VRRP6 legitimately source from link-local addresses.unit <*>, so it covers every configured loopback unit, not just lo0.0.protocols bgp, system ntp/name-server/radius-server, access radius-server, snmp client-list, protocols msdp peer, security ike gateway) at commit time — add or remove a peer there and this filter updates itself on the next commit, nothing to maintain twice. If you would rather not use apply-path, every one of these except IKE can take a typed list of addresses instead (see below).BGP-NEIGHBORS-STATIC, plus -STATIC-V6 for IPv6) and the term lists it next to, or instead of, the apply-path list. Use it for servers configured by hostname (apply-path cannot expand an FQDN), for hosts that are not in this router’s config, or for one filter shared by many routers. With apply-path off and nothing typed, no term is generated and that traffic hits the final discard, so the tool warns. A static list does not follow later config changes: add a neighbor and you must add it here too.unit <*> — a group does nothing on its own until the trailing apply-groups line activates it.commit confirmed when applying a new RE filter remotely — a mistake here can lock you out of the box entirely.next term, so it only rate-limits and leaves the accept/discard decision to the terms after it.apply-path holds a single pattern: a second apply-path line on the same prefix-list silently replaces the first (checked on Junos 26.2). A second pattern therefore needs its own prefix-list, and the term lists both — that is why BGP has BGP-NEIGHBORS and BGP-NEIGHBORS-VRF. Also, <*.*> expands IPv4 addresses only and <*:*> IPv6 only, while <*> expands both.access radius-server, not system radius-server. Tick the 802.1X option or their replies will not match the source list.set system services netconf ssh port). List the real port; untick 830 if you no longer use it.host-inbound-traffic system-services ike; this filter does not replace that.family inet. A dual-stack box also needs a family inet6 filter — tick “Also Generate IPv6” and the matching terms are mirrored into it.Provided as-is, with no warranty of any kind. This generates a starting point, not a certified or vendor-validated configuration — exact syntax and defaults can vary by Junos version and platform. Always read through the generated config line by line, verify it against current Juniper documentation and your own environment, and test in a lab before applying to production. A mistake in a Routing Engine protection filter can lock you out of the device entirely — always use commit confirmed when applying changes remotely. See the full disclaimer.
