158 lines
8.4 KiB
PHP
158 lines
8.4 KiB
PHP
<x-slot:breadcrumbParent>Sicherheit</x-slot:breadcrumbParent>
|
|
<x-slot:breadcrumb>Fail2Ban</x-slot:breadcrumb>
|
|
|
|
<div>
|
|
|
|
<div class="mbx-page-header">
|
|
<div class="mbx-page-title">
|
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none">
|
|
<path d="M8 1.5L13.5 4v5.5c0 3-2.3 5.2-5.5 5.5C4.8 14.7 2.5 12.5 2.5 9.5V4L8 1.5Z" stroke="currentColor" stroke-width="1.3" stroke-linejoin="round"/>
|
|
</svg>
|
|
Fail2Ban
|
|
</div>
|
|
<div class="mbx-page-actions">
|
|
<button wire:click="save" class="mbx-btn-primary">
|
|
<svg width="12" height="12" viewBox="0 0 14 14" fill="none"><path d="M2 2h8l2 2v8a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1Z" stroke="currentColor" stroke-width="1.2"/><path d="M5 2v3h4V2" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/></svg>
|
|
<span wire:loading.remove wire:target="save">Speichern & Reload</span>
|
|
<span wire:loading wire:target="save">Speichert…</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="sec-layout">
|
|
|
|
{{-- ═══ Main ═══ --}}
|
|
<div style="min-width:0">
|
|
|
|
<div class="mbx-sections">
|
|
|
|
{{-- Settings --}}
|
|
<div class="mbx-section">
|
|
<div class="mbx-domain-head">
|
|
<div class="mbx-domain-info">
|
|
<span class="mbx-badge-mute">Konfiguration</span>
|
|
</div>
|
|
</div>
|
|
<div style="padding:16px 18px">
|
|
<div class="mw-modal-grid2">
|
|
<div>
|
|
<label class="mw-modal-label">Bantime (Sek.)</label>
|
|
<input type="number" wire:model.defer="bantime" class="mw-modal-input">
|
|
<div class="mw-modal-hint">Standard-Sperrzeit nach Bann</div>
|
|
</div>
|
|
<div>
|
|
<label class="mw-modal-label">Max. Bantime (Sek.)</label>
|
|
<input type="number" wire:model.defer="max_bantime" class="mw-modal-input">
|
|
<div class="mw-modal-hint">Obergrenze bei dyn. Erhöhung</div>
|
|
</div>
|
|
<div>
|
|
<label class="mw-modal-label">Findtime (Sek.)</label>
|
|
<input type="number" wire:model.defer="findtime" class="mw-modal-input">
|
|
<div class="mw-modal-hint">Zeitfenster für Fehlversuche</div>
|
|
</div>
|
|
<div>
|
|
<label class="mw-modal-label">Max. Retry</label>
|
|
<input type="number" wire:model.defer="max_retry" class="mw-modal-input">
|
|
<div class="mw-modal-hint">Fehlversuche bis Bann</div>
|
|
</div>
|
|
<div>
|
|
<label class="mw-modal-label">CIDR IPv4</label>
|
|
<input type="number" wire:model.defer="cidr_v4" class="mw-modal-input" min="8" max="32">
|
|
<div class="mw-modal-hint">z. B. 32 = einzelne IP</div>
|
|
</div>
|
|
<div>
|
|
<label class="mw-modal-label">CIDR IPv6</label>
|
|
<input type="number" wire:model.defer="cidr_v6" class="mw-modal-input" min="8" max="128">
|
|
<div class="mw-modal-hint">z. B. 128 = einzelne IP</div>
|
|
</div>
|
|
</div>
|
|
<hr class="mw-modal-sep" style="margin:14px 0">
|
|
<label class="sec-check">
|
|
<input type="checkbox" wire:model.defer="bantime_increment">
|
|
<span style="font-size:12.5px;color:var(--mw-t2)">Bantime dynamisch erhöhen (increment)</span>
|
|
</label>
|
|
@if($bantime_increment)
|
|
<div style="margin-top:12px">
|
|
<label class="mw-modal-label">Erhöhungs-Faktor</label>
|
|
<input type="number" step="0.1" wire:model.defer="bantime_factor" class="mw-modal-input" style="max-width:180px">
|
|
<div class="mw-modal-hint">Multiplikator bei Wiederholungen (z. B. 1.5 → 1 h, 1.5 h, 2.25 h …)</div>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
|
|
{{-- Banlist --}}
|
|
<div class="mbx-section">
|
|
<livewire:ui.security.fail2ban-banlist />
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{-- ═══ Sidebar ═══ --}}
|
|
<div>
|
|
|
|
<div class="mbx-sections">
|
|
|
|
{{-- Whitelist --}}
|
|
<div class="mbx-section">
|
|
<div class="mbx-domain-head">
|
|
<div class="mbx-domain-info">
|
|
<span class="mbx-badge-mute">Whitelist</span>
|
|
</div>
|
|
<button class="mbx-btn-primary" style="font-size:10.5px;padding:3px 9px;gap:4px"
|
|
wire:click="$dispatch('openModal',{component:'ui.security.modal.fail2ban-ip-modal',arguments:{type:'whitelist'}})">
|
|
<svg width="10" height="10" viewBox="0 0 11 11" fill="none"><path d="M5.5 1v9M1 5.5h9" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>
|
|
IP
|
|
</button>
|
|
</div>
|
|
<div style="padding:10px 14px">
|
|
@forelse($whitelist as $ip)
|
|
<div class="f2b-ip-item">
|
|
<code style="font-size:11.5px;color:var(--mw-t1)">{{ $ip }}</code>
|
|
<button class="mbx-act-btn" title="Entfernen"
|
|
wire:click="$dispatch('openModal',{component:'ui.security.modal.fail2ban-ip-modal',arguments:{mode:'remove',type:'whitelist',ip:'{{ $ip }}'}})">
|
|
<svg width="11" height="11" viewBox="0 0 12 12" fill="none"><path d="M2 2l8 8M10 2l-8 8" stroke="currentColor" stroke-width="1.3" stroke-linecap="round"/></svg>
|
|
</button>
|
|
</div>
|
|
@empty
|
|
<div style="font-size:11.5px;color:var(--mw-t4);text-align:center;padding:6px 0">Keine Einträge</div>
|
|
@endforelse
|
|
</div>
|
|
</div>
|
|
|
|
{{-- Blacklist --}}
|
|
<div class="mbx-section" style="margin-top:14px">
|
|
<div class="mbx-domain-head">
|
|
<div class="mbx-domain-info">
|
|
<span class="sec-bl-badge">Blacklist</span>
|
|
</div>
|
|
<button class="sec-bl-btn"
|
|
wire:click="$dispatch('openModal',{component:'ui.security.modal.fail2ban-ip-modal',arguments:{type:'blacklist'}})">
|
|
<svg width="10" height="10" viewBox="0 0 11 11" fill="none"><path d="M5.5 1v9M1 5.5h9" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>
|
|
IP
|
|
</button>
|
|
</div>
|
|
<div style="padding:10px 14px">
|
|
@forelse($blacklist as $ip)
|
|
<div class="f2b-ip-item" style="border-color:rgba(239,68,68,.25);background:rgba(239,68,68,.05)">
|
|
<code style="font-size:11.5px;color:var(--mw-t1)">{{ $ip }}</code>
|
|
<button class="mbx-act-btn mbx-act-danger" title="Entfernen"
|
|
wire:click="$dispatch('openModal',{component:'ui.security.modal.fail2ban-ip-modal',arguments:{mode:'remove',type:'blacklist',ip:'{{ $ip }}'}})">
|
|
<svg width="11" height="11" viewBox="0 0 12 12" fill="none"><path d="M2 2l8 8M10 2l-8 8" stroke="currentColor" stroke-width="1.3" stroke-linecap="round"/></svg>
|
|
</button>
|
|
</div>
|
|
@empty
|
|
<div style="font-size:11.5px;color:var(--mw-t4);text-align:center;padding:6px 0">Keine Einträge</div>
|
|
@endforelse
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|