HomeLab Networking
Online Resources
- Proxmox Software-Defined Network
- OPNsense documentation
- Beginner's Guide to Set up a Full Network using OPNsense
VNet Overview
Name | Alias | Subnet | Gateway | SNAT | DHCP Range |
---|---|---|---|---|---|
AttDMZ | Attacker DMZ | 10.1.0.0/24 | 10.1.0.1 | FALSE | 10.1.0.100 - 10.1.0.254 |
AttExt | Attacker External | 10.1.1.0/24 | 10.1.1.1 | FALSE | 10.1.1.100 - 10.1.1.254 |
AttInt | Attacker Internal | 10.1.2.0/24 | 10.1.2.1 | FALSE | 10.1.2.100 - 10.1.2.254 |
TarDMZ | Target DMZ | 10.2.0.0/24 | 10.2.0.1 | FALSE | 10.2.0.100 - 10.2.0.254 |
TarAdm | Target Admin | 10.2.1.0/24 | 10.2.1.1 | FALSE | 10.2.1.100 - 10.2.1.254 |
TarIT | Target IT | 10.2.2.0/24 | 10.2.2.1 | FALSE | 10.2.2.100 - 10.2.2.254 |
TarHR | Target HR | 10.2.3.0/24 | 10.2.3.1 | FALSE | 10.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
Install OPNsense permanently
- Login with:
installer:opnsense
- 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.
- Login using
root:[THE_PASSWORD_YOU_CHOSE_DURING_SETUP]
- Open the Shell
- Temporarily disable the Firewall:
pfctl -d
- All the following rule to the WAN Interface:
Basic Config
- Login using
root:[THE_PASSWORD_YOU_CHOSE_DURING_SETUP]
- Set the WAN interface to
vmbr0
interface and leave the rest as optional interfaces - Add the other interfaces (to the VNets) and give them a representative name
- Enable all the interfaces in the Web GUI
- For each interface set their static IPv4 to the gateway address of the respective VNet (e.g.:
TarDMZ
gets10.2.0.1
)
- Enable DHCP on each Interface and Configure the DHCP ranges as described in the table above
- Set DNS servers and uncheck
Allow DNS server list to be overridden by DHCP/PPP on WAN
[2]
Rules
-
Add a new alias for private networks:
-
Create a new firewall rule to enable internet traffic and clone it to the interfaces
TarAdm
,TarDMZ
,TarHR
&TarIT
:
-
Create rules to allow traffic from the respective VNet into the VNets on each interface:
WarningPlease note that these rules are very broad/loose!
Relevant Note(s): Proxmox Hardening