HomeLab Networking

Online Resources

VNet Overview

NameAliasSubnetGatewaySNATDHCP Range
AttDMZAttacker DMZ10.1.0.0/2410.1.0.1FALSE10.1.0.100 - 10.1.0.254
AttExtAttacker External10.1.1.0/2410.1.1.1FALSE10.1.1.100 - 10.1.1.254
AttIntAttacker Internal10.1.2.0/2410.1.2.1FALSE10.1.2.100 - 10.1.2.254
TarDMZTarget DMZ10.2.0.0/2410.2.0.1FALSE10.2.0.100 - 10.2.0.254
TarAdmTarget Admin10.2.1.0/2410.2.1.1FALSE10.2.1.100 - 10.2.1.254
TarITTarget IT10.2.2.0/2410.2.2.1FALSE10.2.2.100 - 10.2.2.254
TarHRTarget HR10.2.3.0/2410.2.3.1FALSE10.2.3.100 - 10.2.3.254

IMPORTANT

Do NOT specify a Gateway in Proxmox’s Subnet UI, as this will cause an IP conflict with the OPNsense Firewall we’ll configure in the next section.

IMPORTANT

Do NOT specify any DHCP Ranges either, we’ll configure those in OPNsense as well.

Configuring the OPNsense Firewalls

Hardware

1

Install OPNsense permanently

  1. Login with: installer:opnsense
  2. Then go through the installation wizard

Setup GUI Access from WAN Interface

WARNING

This is especially not recommended for PROD! But since this Lab is isolated, and I’m my own attacker, I am configuring GUI Access on the WAN interface for convenience’s sake.

  1. Login using root:[THE_PASSWORD_YOU_CHOSE_DURING_SETUP]
  2. Open the Shell
  3. Temporarily disable the Firewall: pfctl -d
  4. All the following rule to the WAN Interface:

Basic Config

  1. Login using root:[THE_PASSWORD_YOU_CHOSE_DURING_SETUP]
  2. Set the WAN interface to vmbr0 interface and leave the rest as optional interfaces
  3. Add the other interfaces (to the VNets) and give them a representative name
  4. Enable all the interfaces in the Web GUI
  5. For each interface set their static IPv4 to the gateway address of the respective VNet (e.g.: TarDMZ gets 10.2.0.1)
  6. Enable DHCP on each Interface and Configure the DHCP ranges as described in the table above
  7. Set DNS servers and uncheck Allow DNS server list to be overridden by DHCP/PPP on WAN 2

Rules

  1. Add a new alias for private networks:

  2. Create a new firewall rule to enable internet traffic and clone it to the interfaces TarAdm, TarDMZ, TarHR & TarIT:

  3. Create rules to allow traffic from the respective VNet into the VNets on each interface:

    WARNING

    Please note that these rules are very broad/loose!

3


Relevant Note(s): Proxmox Hardening

Footnotes

  1. https://docs.opnsense.org/manual/hardware.html#hardware-requirements

  2. https://homenetworkguy.com/how-to/confused-about-dns-configuration-in-opnsense/

  3. https://docs.opnsense.org/manual/firewall.html