@if(!$status) Unable to Load Server Status

Could not retrieve status from hypervisor:

Retry
@else {{-- Global Loader Styles --}}
{{-- Page Header --}}

Firewall Management

Configure firewall rules, policies, aliases, and IPSets for your virtual machine.

{{-- Error Modal --}} @if($error && $showErrorModal)

{{ $error }}

Close
@endif {{-- Master Firewall Control --}}

Master Firewall Control

@if($status->status === 'running') Running @else Stopped @endif

Firewall Status

@if($firewallEnabled) Active - Your VM is protected @else Disabled - No firewall protection @endif

{{ $firewallEnabled ? 'Enabled' : 'Disabled' }}
@if($firewallEnabled) {{-- Firewall Configuration --}}
{{-- Default Policies --}}

Default Policies

{{-- Network Adapters --}}

Network Adapters

@if(count($networkAdapters) > 0)
@foreach($networkAdapters as $adapter)
{{ $adapter['name'] }} {{ ($adapterFirewallStates[$adapter['name']] ?? false) ? 'Active' : 'Off' }}
{{ ucfirst($adapter['model'] ?? 'Unknown') }} @if($adapter['mac']) {{ $adapter['mac'] }} @endif
{{ ($adapterFirewallStates[$adapter['name']] ?? false) ? 'On' : 'Off' }}
@endforeach
@else @endif
{{-- Firewall Management Tabs --}}
{{-- RULES TAB --}}

Firewall Rules

@if(count($rules) > 0)
@foreach($rules as $index => $rule) @endforeach
Order Pos Action Direction Source Destination Protocol Ports Status Actions
@if($index > 0) @else
@endif @if($index < count($rules) - 1) @else
@endif
{{ $rule['pos'] }} {{ $rule['action'] }} {{ $rule['direction'] ?? 'IN' }} {{ $rule['source'] ?? '-' }} {{ $rule['dest'] ?? '-' }} {{ $rule['proto'] ?? '-' }} {{ $rule['dport'] ?? $rule['sport'] ?? '-' }} @if($rule['enable']) Enabled @else Disabled @endif
@else Add Rule @endif
{{-- ALIASES TAB --}}

IP Aliases

@if(count($aliases) > 0)
@foreach($aliases as $alias)

{{ $alias['name'] }}

{{ $alias['comment'] ?? 'No description' }}

@if($alias['cidr']) @foreach(explode(',', $alias['cidr']) as $cidr)
{{ trim($cidr) }}
@endforeach @endif
@endforeach
@else Add Alias @endif
{{-- IPSETS TAB --}}

IP Sets

@if(count($ipsets) > 0)
@foreach($ipsets as $ipset)

{{ $ipset['name'] }}

{{ $ipset['comment'] ?? 'No description' }}

Addresses: {{ count($ipset['cidr'] ?? []) }}
@if(isset($ipset['cidr']) && count($ipset['cidr']) > 0)
@foreach(array_slice($ipset['cidr'], 0, 5) as $cidr) {{ $cidr }} @endforeach @if(count($ipset['cidr']) > 5)

... and {{ count($ipset['cidr']) - 5 }} more

@endif
@endif
@endforeach
@else Add IP Set @endif
{{-- LOGS TAB --}}

Firewall Logs

@if(count($firewallLogs) > 0)
@foreach($firewallLogs as $log)
{{ $log['action'] }} {{ $log['time'] }}
{{ $log['interface'] ?? 'N/A' }}
Source
{{ $log['src'] ?? 'N/A' }}
Destination
{{ $log['dst'] ?? 'N/A' }}
Protocol
{{ $log['proto'] ?? 'N/A' }}
Port
{{ $log['dport'] ?? $log['sport'] ?? 'N/A' }}
@endforeach
@else @endif
{{-- SAVED CONFIGURATIONS TAB --}}

Saved Configurations

@if(count($savedConfigurations) > 0)
@foreach($savedConfigurations as $config)

{{ $config['name'] ?? 'Configuration ' . $config['id'] }}

{{ $config['description'] ?? 'No description' }}

{{ $config['created_at'] }}

Rules: {{ $config['rules_count'] ?? 0 }}
Aliases: {{ $config['aliases_count'] ?? 0 }}
IP Sets: {{ $config['ipsets_count'] ?? 0 }}
@endforeach
@else @endif
@endif {{-- Policy Info Modal --}} @if($showPolicyInfoModal)

Understanding Firewall Policies

How default policies control your network traffic

Policy In (Incoming Traffic)

Controls what happens to traffic coming INTO your VM when it doesn't match any explicit firewall rule.

  • ACCEPT: Allow all incoming traffic by default (permissive, requires explicit DENY rules)
  • REJECT: Block incoming traffic and send rejection notification to sender
  • DROP: Silently discard incoming traffic without notifying sender (recommended)

Policy Out (Outgoing Traffic)

Controls what happens to traffic going OUT of your VM when it doesn't match any explicit firewall rule.

  • ACCEPT: Allow all outgoing traffic by default (recommended for most VMs)
  • REJECT: Block outgoing traffic and notify your VM
  • DROP: Silently discard outgoing traffic

Creating a Whitelist Configuration

To create a strict whitelist (only allow specific traffic):

  1. Set Policy In to DROP
  2. Set Policy Out to DROP (if restricting outbound)
  3. Create explicit ACCEPT rules for allowed traffic
  4. Everything not explicitly allowed will be blocked

Additional Filters

IP Filter: Validates that source/destination IP addresses in packets match the VM's assigned IPs. Helps prevent IP spoofing.

MAC Filter: Validates that MAC addresses match the VM's network adapters. Provides additional layer of security.

@endif {{-- Rule Form Modal --}} @if($showRuleForm)

{{ $editingRuleIndex !== null ? 'Edit' : 'Create' }} Firewall Rule

{{-- Action --}}
{{-- Type --}}
{{-- Macro --}}

Selecting a macro will automatically set the protocol and port(s)

{{-- Interface --}}
{{-- Source --}}

Can use alias names or leave empty for any source

{{-- Destination --}}
{{-- Protocol --}}
{{-- Destination Port --}}
{{-- Source Port --}}
{{-- Log Level --}}
{{-- Comment --}}
{{-- Enable --}}
@endif {{-- Delete Rule Modal --}} @if($showDeleteRuleModal && $deletingRuleIndex !== null && isset($rules[$deletingRuleIndex])) @php $ruleToDelete = $rules[$deletingRuleIndex]; @endphp

Delete Firewall Rule

Are you sure you want to delete this rule? This action cannot be undone.

Action: {{ $ruleToDelete['action'] ?? '-' }}
Source: {{ $ruleToDelete['source'] ?? 'Any' }}
Destination: {{ $ruleToDelete['dest'] ?? 'Any' }}
@endif {{-- Alias Form Modal --}} @if($showAliasForm)

{{ $editingAliasName ? 'Edit' : 'Create' }} IP Alias

@error('aliasName') {{ $message }} @enderror
@error('aliasCidr') {{ $message }} @enderror
@endif {{-- Delete Alias Modal --}} @if($showDeleteAliasModal && $deletingAliasName)

Delete IP Alias

Delete alias "{{ $deletingAliasName }}"?

This may affect firewall rules using this alias.

Cancel Delete Deleting...
@endif {{-- IPSet Form Modal --}} @if($showIPSetForm)

Create IP Set

@error('ipsetName') {{ $message }} @enderror

After creating the IPSet, you can add IP addresses and CIDR ranges to it.

@endif {{-- Delete IPSet Modal --}} @if($showDeleteIPSetModal && $deletingIPSetName)

Delete IP Set

Delete IPSet "{{ $deletingIPSetName }}"?

All members will be removed and rules using this IPSet may be affected.

Cancel Delete Deleting...
@endif {{-- IPSet Member Form Modal --}} @if($showIPSetMemberForm && $selectedIPSetName)

Add IP/CIDR to {{ $selectedIPSetName }}

@error('memberCidr') {{ $message }} @enderror
@endif {{-- Delete IPSet Member Modal --}} @if($showDeleteIPSetMemberModal && $deletingMemberCidr)

Remove Member

Remove "{{ $deletingMemberCidr }}" from {{ $selectedIPSetName }}?

Cancel Remove Removing...
@endif {{-- Save Configuration Modal --}} @if($showSaveConfigModal)

Save Current Configuration

Save your current firewall rules and policies as a reusable configuration

@error('newConfigName')

{{ $message }}

@enderror

Configuration Summary

Rules {{ count($rules) }}
Incoming Policy {{ $policyIn }}
Outgoing Policy {{ $policyOut }}
@endif
@endif