Write the lists to a MikroTik router

Blocks the addresses on the block list at the router (for example the CCR2004 as the DMZ or core router), before they reach anything behind it - the whole ecosystem, not only this Portal: an address list you name (NEXXVU-blocked unless you choose another) and NEXXVU-allowed (IPv4 and IPv6), and a rule in IP › Firewall › Raw (prerouting, first) that drops the block list. Entries have no timeout: they stay until you unblock the address and write the lists again. NEXXVU-allowed holds the login allowlist for your own rules (for example management access). {{ fresh_tag("security:router-shared") }}Only this Portal's entries are replaced: each carries its Portal's name (comment nexxvu:<Portal>), so several Portals can write the same router without removing each other's. Nothing else on the router changes. The router's administrator account is used for this action only and never stored.

For the routers: {{ firewall.blocked|length }} blocked address{{ '' if firewall.blocked|length == 1 else 'es' }} (those marked "Router: yes") · Allowlist: {{ firewall.allowed|length }}

{% if not firewall.routers %}

No MikroTik router is onboarded over SSH yet.

{% else %} {% for r in firewall.routers %}{% set h = firewall.held.get(r.id) %}

{{ r.label }} {{ r.host }}

{% if r.sync %}

{# alpha.314: one tag per card (the review saw "BUG FIX BUG FIX"), the newest fix first #}{{ fresh_tag("security:router-ipv6-128") or fresh_tag("security:router-each-address") or fresh_tag("security:router-unconfirmed") or fresh_tag("security:router-duplicates") }}{{ 'Kept up to date' if r.sync.last_ok else 'Not updated' }} list {{ r.sync.list_name }} · {{ r.sync.last_count or 0 }} address{{ '' if r.sync.last_count == 1 else 'es' }} · last written {{ (r.sync.last_at or '')[:16]|replace('T', ' ') }} UTC by NEXXVU's update account{% if r.sync.last_detail %} · {{ r.sync.last_detail }}{% endif %}

{% set ck = r.check %}{% if ck %}

{{ fresh_tag("security:router-check") }}Router check {% if ck.error %}Not checked {{ ck.error }}{% else %}{{ 'Matches' if ck.ok else 'Differs' }} {{ ck.on_list }} of {{ ck.sent }} on {{ ck.list }} · {{ ck.missing_count }} missing · {{ ck.extra if ck.extra is not none else '?' }} extra · {{ ck.other_count }} only on another list · {{ ck.covered_skipped }} not sent (a blocked network covers them){% if ck.left_on_portal %} · {{ ck.left_on_portal }} oldest kept on this Portal only{% endif %}{% endif %}

{% if ck.missing %}

Missing on the router: {% for a in ck.missing %}{{ a }}{{ ', ' if not loop.last }}{% endfor %}{% if ck.missing_count > ck.missing|length %} …{% endif %} - Write now sends them again.

{% endif %} {% if ck.other %}

On another list only: {% for a in ck.other %}{{ a }}{{ ', ' if not loop.last }}{% endfor %}{% if ck.other_count > ck.other|length %} …{% endif %}.

{% endif %}
{% endif %} {% set hl = r.health %}{% if hl and hl.at is defined %}

{{ fresh_tag("security:router-health") }}Health

CPU
{{ hl.cpu if hl.cpu is not none else '?' }} %{% if hl.cores %} {% endif %}
Connection tracking
{% if hl.ct_percent is not none %}{{ hl.ct_percent }} % {% else %}not readable{% endif %}
NEXXVU list
{% if hl.list is not none %}{{ hl.list }} of {{ hl.max_entries }}{% else %}not readable{% endif %}
Over the per-source limit
{% if hl.flood %}{{ hl.flood }} source{{ '' if hl.flood == 1 else 's' }} now{% else %}none now{% endif %}
{% if hl.proposed %}

Proposed: {{ hl.proposed|length }} source{{ '' if hl.proposed|length == 1 else 's' }} opened new connections faster than the per-source limit and {{ 'is' if hl.proposed|length == 1 else 'are' }} not blocked yet. Blocking puts them on the NEXXVU list, which the router drops in the raw table, before connection tracking. Nothing is blocked until you confirm in the review.

{% for a in hl.proposed %} {% endfor %}

{% endif %}
{% elif hl and hl.error %}{% endif %}

NEXXVU checks every minute: when the block list changes - an address blocked or unblocked, by you or automatically - the router gets the new list within a minute, written by NEXXVU's key-only update account on the router (no administrator password is stored). Every 6 hours it is written again anyway.

{% endif %} {% if r.last %}

Last written {{ r.last.at[:16]|replace('T', ' ') }} UTC by {{ r.last.actor or '—' }}: list {{ r.last.list }}, {{ r.last.blocked }} blocked address{{ '' if r.last.blocked == 1 else 'es' }}.

{% endif %} {% if not r.approved %}

Its SSH address is not approved yet.

{% elif h %}

RouterOS {{ h.plan.version }} on {{ h.plan.identity }}. This will run:

{% for c in h.plan.changes %}{{ c }}
{% endfor %}
{% else %}
{% endif %}
{% endfor %}{% endif %}