{ "client_requirement": "client_is_viewer+", "items": [ { "type": "header_page_title", "items": [ { "type": "h1", "text": "Banned IPs" }, { "type": "p", "text": "IPs and ranges blocked in both directions at the nftables firewall." } ] }, { "type": "info_bar", "variant": "info", "text": "Supports single IPs, CIDR (94.130.0.0/16), wildcards (94.130.*.*), and ranges (94.130.52.1-20). IPv4 and IPv6 are both supported." }, { "type": "table", "datasource": "config:banned_ips", "empty_message": "No IP bans configured.", "columns": [ { "label": "Description", "field": "description" }, { "label": "IP / Range", "field": "ip", "class": "col-mono" }, { "label": "Rule State", "field": "enabled", "render": "badge_enabled_disabled" } ], "row_actions": [ { "client_requirement": "client_is_administrator+", "method": "js_edit", "target": "add-form", "text": "Edit", "class": "btn-ghost btn-sm" }, { "client_requirement": "client_is_administrator+", "action": "/action/bannedips/table_delete", "method": "post", "text": "Delete", "class": "btn-danger btn-sm" } ] }, { "type": "card", "id": "add-form", "label": "Add Banned IP", "client_requirement": "client_is_administrator+", "items": [ { "type": "form", "action": "/action/bannedips/addip_add", "method": "post", "items": [ { "type": "hidden", "name": "row_index", "value": "" }, { "type": "field", "label": "Description", "name": "description", "input_type": "text", "placeholder": "e.g. Bad actor", "hint": "Optional label for this entry." }, { "type": "field", "label": "IP / Range", "name": "ip", "input_type": "text", "placeholder": "e.g. 1.2.3.4 or 1.2.3.0/24" }, { "type": "field", "label": "Enabled", "name": "enabled", "input_type": "checkbox" }, { "type": "button_row", "items": [ { "type": "button_primary", "action": "/action/bannedips/addip_add", "method": "post", "text": "Add Banned IP" }, { "type": "button_cancel", "text": "Cancel" } ] } ] } ] } ] }