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

Could not retrieve status from hypervisor:

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

The Firewall Management interface provides comprehensive control over your virtual machine's network security, including rule-based filtering, IP aliases, and security policies.

Firewall Rules: Create granular rules to allow or block specific traffic patterns.

IP Aliases: Define named groups of IP addresses for easier rule management.

IP Sets: Manage collections of IP addresses for advanced filtering.

Security Logs: Monitor firewall activity and blocked attempts.

{{-- 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' }}
{{ $firewallEnabled ? 'Disabling...' : 'Enabling...' }}
@if($firewallEnabled) {{-- Firewall Configuration --}}
{{-- Default Policies --}}

Default Policies

Update Policies Updating...
{{-- 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

Refresh Clear 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

Save Current Config
@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 Save Current Config @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 @endif
@endif