{{ __('Firewall Setup') }}
@if($selectedRouter) @endif
@if(!$selectedRouter)
{{ __('Select a connected router to manage firewall rules.') }}
@else @php $badgeClasses = [ 'accept' => 'bg-success', 'drop' => 'bg-danger', 'reject' => 'bg-warning text-dark', 'masquerade' => 'bg-info text-dark', 'dst-nat' => 'bg-primary', 'src-nat' => 'bg-primary' ]; @endphp {{-- FILTER --}} @if($activeTab==='filter')
{{ $editFilterId ? __('Edit Filter Rule') : __('Add Filter Rule') }}
@if($editFilterId) @endif
{!! __('Filter Rules on :router', ['router' => '' . e($selectedRouter) . '']) !!}
@forelse($filterRules as $i => $rule) @php $isR = is_array($rule); @endphp @empty @endforelse
#{{ __('Chain') }}{{ __('Action') }}{{ __('Protocol') }}{{ __('Src') }}{{ __('Dst') }}{{ __('Comment') }}{{ __('Act') }}
{{ $i }} {{ $isR ? ($rule['chain'] ?? '-') : '-' }} {{ $isR ? ($rule['action'] ?? '-') : '-' }} {{ $isR ? ($rule['protocol'] ?? 'any') : 'any' }} {{ $isR ? ($rule['src-address'] ?? 'any') : 'any' }} {{ $isR ? ($rule['dst-address'] ?? 'any') : 'any' }} {{ $isR ? ($rule['comment'] ?? '') : '' }}
@if(($isR ? ($rule['disabled'] ?? 'false') : 'false') !== 'false') @else @endif
{{ __('No filter rules found.') }}
@endif {{-- NAT --}} @if($activeTab==='nat')
{{ $editNatId ? __('Edit NAT Rule') : __('Add NAT Rule') }}
@if($editNatId) @endif
{!! __('NAT Rules on :router', ['router' => '' . e($selectedRouter) . '']) !!}
@forelse($natRules as $i => $rule) @php $isN = is_array($rule); @endphp @empty @endforelse
#{{ __('Chain') }}{{ __('Action') }}{{ __('Out Iface') }}{{ __('Src Addr') }}{{ __('Comment') }}{{ __('Act') }}
{{ $i }} {{ $isN ? ($rule['chain'] ?? '-') : '-' }} {{ $isN ? ($rule['action'] ?? '-') : '-' }} {{ $isN ? ($rule['out-interface'] ?? 'any') : 'any' }} {{ $isN ? ($rule['src-address'] ?? 'any') : 'any' }} {{ $isN ? ($rule['comment'] ?? '') : '' }}
@if(($isN ? ($rule['disabled'] ?? 'false') : 'false') !== 'false') @else @endif
{{ __('No NAT rules found.') }}
@endif {{-- MANGLE --}} @if($activeTab==='mangle')
{!! __('Mangle Rules on :router', ['router' => '' . e($selectedRouter) . '']) !!}
@forelse($mangleRules as $i => $rule) @php $isM = is_array($rule); @endphp @empty @endforelse
#{{ __('Chain') }}{{ __('Action') }}{{ __('Passthrough') }}{{ __('Comment') }}{{ __('Act') }}
{{ $i }} {{ $isM ? ($rule['chain'] ?? '-') : '-' }} {{ $isM ? ($rule['action'] ?? '-') : '-' }} {{ $isM ? ($rule['passthrough'] ?? '-') : '-' }} {{ $isM ? ($rule['comment'] ?? '') : '' }} @if(($isM ? ($rule['disabled'] ?? 'false') : 'false') !== 'false') @else @endif
{{ __('No mangle rules found.') }}
@endif {{-- ADDRESS LISTS --}} @if($activeTab==='addresslist')
{{ $editListId ? __('Edit Address List') : __('Add to Address List') }}
@error('al_list')
{{ $message }}
@enderror
@error('al_address')
{{ $message }}
@enderror
@if($editListId) @endif
{!! __('Address Lists on :router', ['router' => '' . e($selectedRouter) . '']) !!}
@forelse($addressLists as $i => $entry) @php $isA = is_array($entry); @endphp @empty @endforelse
{{ __('List') }}{{ __('Address') }}{{ __('Timeout') }}{{ __('Comment') }}{{ __('Action') }}
{{ $isA ? ($entry['list'] ?? '-') : '-' }} {{ ($isA ? $entry['address'] : $entry) ?? '-' }} {{ $isA ? ($entry['timeout'] ?? '—') : '—' }} {{ $isA ? ($entry['comment'] ?? '') : '' }}
{{ __('No address list entries found.') }}
@endif @endif