{# Hani #1 2026-10-25: Security events per device - the same categories and blocking as Settings › Security events. #} {% set ev = sec.events %} {% import "_ai_analysis.html" as ai with context %}{% set AI = ai_analysis((ev.top or [])|map(attribute='address')|list) if ev else {} %}{% set AIR = ai_ready() %}{% set RC = rule_coverage((ev.top or [])|map(attribute='address')|list) if ev else {} %}{% set ADS = ai_defence_status((ev.top or [])|map(attribute='address')|list) if ev else {} %} {% if not ev %}
Security events are not available on this Portal.
{% else %}{{ {'probe': 'Probes (scans, injection attempts)', 'not_found': 'Unknown pages', 'denied': 'Refused', 'error': 'Server errors'}[kind] }}
{{ ev.counts.get(kind, 0) }}
Firewall log lines
{{ ev.firewall_total }}{% if (ev.firewall_meta or {}).capped %}+{% endif %}
A web server's visitors come from its access log (Tools › Logs); the firewall's addresses from the device's own log (MikroTik: log the drop rules you want to see). Block refuses the address on this Portal and, through Blocked addresses › routers, at the routers for the whole ecosystem.
{# Hani #1 2026-11-01: one Security tab for every device - both address tables select into one bar with the same actions as Settings › Security events; addresses on private networks (the Portal itself, its hosts) cannot be selected. #} {% if ev.top or ev.firewall %}{% endif %}| Address | Country | Requests | {{ ai.headers() }}{{ ai.rule_header() }}Last (UTC) | Actions | |
|---|---|---|---|---|---|
{{ t.address }} | {{ (t.place|country) if t.place else '—' }} | {{ t.n }}{% if t.probes %} {{ t.probes }} probe{{ '' if t.probes == 1 else 's' }}{% endif %} | {{ ai.cells(AI.get(t.address), t.address, 'dev-' ~ loop.index) }}{{ ai.rule_cell(RC.get(t.address), t.address, ADS.get(t.address)) }}{{ (t.last or '')[:16]|replace('T', ' ') }} | {% if t.blocked %}Blocked {% endif %}{{ ai.dialog(AI.get(t.address), t.address, 'dev-' ~ loop.index) }} {% with row=t, dialog_id='dlg-dev-' ~ loop.index, dialog_from='asset:' ~ inventory.asset.id %}{% include "_address_actions_dialog.html" %}{% endwith %} |
No suspicious visitor in this period.
{% endif %}| Address | Country | Log lines | Ports | Actions | |
|---|---|---|---|---|---|
| {% if not f.private %}{% endif %} | {{ f.address }}{{ ai.inline(AIF.get(f.address), f.address) }}{% set ho = HOF.get(f.address) %}{% if ho %}{{ fresh_tag("security:half-open") }}{{ ho.peers }} outside addresses never answeredMost of these lines are this server's own answers to {{ ho.peers }} outside addresses in {{ ho.networks }} network{{ '' if ho.networks == 1 else 's' }} that asked to connect and never answered back (a SYN flood, a half-open scan or faked senders). The router drops the repeated answers as "invalid". {% if ho.waiting %}{{ ho.waiting }} network block{{ '' if ho.waiting == 1 else 's' }} wait{{ 's' if ho.waiting == 1 else '' }} for your approval under Settings › Rules › Waiting for approval.{% else %}A network is proposed for blocking when 10 or more of its addresses do this.{% endif %}{% endif %} | {{ (f.place|country) if f.place else '—' }} | {{ f.n }} | {{ f.ports or '—' }} | {% if f.blocked %}Blocked {% endif %} {% if not f.private %}{% with row=f, dialog_id='dlg-fw-' ~ loop.index, dialog_from='asset:' ~ inventory.asset.id %}{% include "_address_actions_dialog.html" %}{% endwith %}{% else %} {% endif %} |
{{ lbl }}: {{ text }}
{% endfor %} {% if (ev.firewall_meta or {}).timings %}{% endif %} {% else %}No firewall log line with an address in this period.
{% endif %}| Time (UTC) | Event | Address | Request | Result |
|---|---|---|---|---|
| {{ e.at[:19]|replace('T', ' ') }} | {{ {'probe': 'Probe', 'not_found': 'Unknown page', 'denied': 'Refused', 'error': 'Server error'}.get(e.kind, e.kind) }} | {{ e.address or '' }}{% if e.blocked %} Blocked{% endif %} | {{ e.method or '' }} {{ e.path or '' }} | {{ e.status or '' }} |
None in this period.
{% endif %}