Skip to content

Firewall VM Setup

Overview

This guide walks you through setting up a virtual firewall in Proxmox VE. While we'll use OPNSense in this tutorial, you can adapt these instructions for other firewall solutions such as:

  • pfSense
  • Sophos
  • Fortinet
  • Other software firewall distributions

Compatibility

This guide is tested with OPNSense, but the VM configuration steps are generally applicable to other firewall solutions with minimal adjustments.

Prerequisites

  • Proxmox VE installed and accessible
  • OVH dedicated server with additional IP address
  • Basic understanding of networking concepts

Step 1: Download OPNSense ISO

Option A: Direct Download to Proxmox

  1. Navigate to your node's ISO Images section in Proxmox VE:

PVE: ISO Images

  1. Visit the OPNSense download page:

OPNSense Website: Download Page

  1. Copy the URL for the AMD64 DVD image and use "Download from URL" in Proxmox:

PVE ISO "Download from URL" Wizard

Compression

Proxmox automatically handles the bzip compression of the ISO image - no additional steps required.

  1. Wait for the download to complete:

PVE ISO "Download from URL" Console Output

  1. Verify the download was successful:

PVE ISO "Download from URL" Task OK

  1. The ISO will now appear in your ISO Images list:

PVE ISO Images List Populated

Option B: Manual Upload

Alternatively, you can download the ISO to your local machine and upload it through the Proxmox web interface.

Step 2: Create Virtual Machine

Click "Create VM" in the Proxmox web interface to begin the configuration wizard:

PVE Button Group

Configuration Steps

1. General Settings

  • Name: Choose a descriptive name for your firewall VM
  • ✓ Start at boot: Enable for automatic startup

Create Virtual Machine: General

2. OS Configuration

  • Attach ISO image
  • OS Type: Linux
  • Version: Linux kernel 6.x

Create Virtual Machine: OS

3. System Configuration

Important

These settings are crucial for proper UEFI boot functionality.

Required settings:

  • Machine: q35
  • BIOS: OMVF (UEFI)
  • ✓ Add EFI Disk
  • EFI Storage: Select your primary storage volume

Create Virtual Machine: System

4. Storage Configuration

Disk Size

Choose between 8GB-32GB depending on your needs. Most simple deployments work fine with 8GB.

Create Virtual Machine: Disks

5. CPU Settings

important

Always select host as CPU type to ensure optimal performance and feature availability.

Create Virtual Machine: CPU

6. Memory Configuration

  • Default: 4GB RAM
  • Adjust based on your specific requirements and workload

Create Virtual Machine: Memory

7. Network Configuration

Obtaining Virtual MAC from OVH
  1. Access OVH Manager and select your additional IP:

OVH Manager: Manage IPs Screen

  1. Add a virtual MAC:
    • Type: vmware
    • Name: Choose descriptive identifier

OVH Manager: Add a virtual MAC

  1. Wait for confirmation:

OVH Manager: New Virtual MAC Success Message

  1. View the virtual MAC details:

OVH Manager: Click to view Virtual MAC Details

  1. Copy the MAC address for use in Proxmox:

OVH Manager: Details of the virtual MAC

WAN Interface Setup

Apply the Virtual MAC to WAN interface in Proxmox:

PVE Manager: Create VM - Network Config

Set multiqueue to 4 or 8 for better performance (depends on your core count)

WARNING

Disable "Start after creation" and add LAN interface first

alt text

LAN Interface Setup
  1. Select VM in Proxmox
  2. Navigate to Hardware
  3. Click "Add" → "Network Device":

PVE Add Hardware - Network Device Highlighted

  1. Configure as LAN bridge and set appropriate multiqueue value:

PVE Add Hardware - Network Device - Wizard

Step 3: Initial Boot Configuration

UEFI Configuration

Required Step

Secure Boot must be disabled for the OPNSense ISO to boot properly.

  1. Start VM and press F2 repeatedly to enter BIOS:

Proxmox UEFI Boot

  1. Navigate through BIOS:

    • Select "Device Manager":

    PVE UEFI BIOS Screen

    • Choose "Secure Boot Configuration":

    PVE UEFI Device Manager

    • Disable "Attempt Secure Boot":

    PVE UEFI Secure Boot Configuration

  2. Save and Exit (F10)

Boot Process

After configuring UEFI, the system will boot to the OPNSense installer:

OPNsense ISO boot menu

Wait for the boot process to complete:

OPNsense ISO boot progress

Next Steps

Continue to the next section for OPNSense installation and initial configuration.