Private
Public Access
1
0

Add saved firewall configuration functionality

- Implemented the ability to save, view, apply, and delete firewall configurations for users.
- Created a new model for FirewallConfiguration and corresponding database migration.
- Enhanced the firewall view to include a tab for managing saved configurations.
This commit is contained in:
2025-12-08 10:26:32 -05:00
parent 596ac84599
commit e1d2805271
4 changed files with 910 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('ext_proxmox_firewall_configurations', function (Blueprint $table) {
$table->id();
$table->foreignId('user_id')->constrained()->onDelete('cascade');
$table->string('configuration_name');
$table->json('firewall_rules');
$table->string('incoming_policy', 10)->default('DROP');
$table->string('outgoing_policy', 10)->default('ACCEPT');
$table->timestamps();
// Index for faster lookups by user
$table->index('user_id');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('ext_proxmox_firewall_configurations');
}
};