Home Lab Proxmox TrueNAS OPNsense

Setting Up the Perfect Home Lab

1. Introduction to Home Labs

A home lab is a personal network environment where you can test and learn new technologies. Using Proxmox VE, TrueNAS, and OPNsense, you can create a powerful and flexible home lab setup.

  • Proxmox VE: An open-source virtualization platform that allows you to run multiple virtual machines (VMs) and containers.
  • TrueNAS: An open-source storage operating system that provides network-attached storage (NAS) capabilities.
  • OPNsense: An open-source firewall and routing platform.

2. Hardware Requirements

To set up your home lab, you’ll need the following hardware:

  • A powerful server or desktop with a multi-core processor (Intel Xeon or AMD Ryzen recommended), at least 16 GB of RAM, and multiple hard drives or SSDs.
  • Network Interface Cards (NICs): At least two NICs for separating management and network traffic.
  • A reliable internet connection.
  • A dedicated switch to connect your devices.

3. Installing Proxmox VE

Example Steps:

Download Proxmox VE:

Create a Bootable USB Drive:

  • Use a tool like Rufus to create a bootable USB drive with the Proxmox VE ISO.
  • Open Rufus, select your USB drive, choose the Proxmox VE ISO, and click “Start.”

Install Proxmox VE:

  • Boot your server from the USB drive.
  • Select “Install Proxmox VE” from the boot menu.
  • Follow the on-screen instructions, including agreeing to the EULA, selecting the target hard drive, and configuring basic network settings.

Access the Proxmox Web Interface:

  • After installation, access the web interface by navigating to https://<your-server-ip>:8006 in your web browser.
  • Login using the default username root and the password you set during installation.

4. Configuring Proxmox VE

Example Steps:

Create a Cluster (Optional):

  • If you have multiple Proxmox servers, go to Datacenter > Cluster > Create Cluster on the primary node.
  • Note the join information, then on additional nodes, go to Datacenter > Cluster > Join Cluster and enter the join information.

Update Proxmox VE:

  • Access the server via SSH or the Proxmox web shell and run:
    bash apt update apt upgrade -y
  • Reboot the server if necessary.

Set Up Storage:

  • Go to Datacenter > Storage and add local storage or configure additional storage options like NFS or iSCSI.

Networking Configuration:

  • Go to Datacenter > Nodes > Your Node > Network.
  • Configure bridges for VM networking by adding a Linux Bridge and assigning a network interface to it.

5. Installing TrueNAS as a Virtual Machine

Example Steps:

Download TrueNAS:

Create a TrueNAS VM in Proxmox:

  • In the Proxmox web interface, go to Datacenter > Node > Create VM.
  • Enter the VM ID and Name.
  • In the OS tab, select Do not use any media.
  • In the CD/DVD tab, select the TrueNAS ISO.
  • Allocate resources in the CPU, Memory, and Hard Disk tabs (e.g., 2 CPUs, 8 GB RAM, and a suitable disk size).

Install TrueNAS:

  • Boot the VM and follow the installation wizard to install TrueNAS.
  • Select Install/Upgrade, choose the target disk, and set the root password.

6. Configuring TrueNAS for Storage

Example Steps:

Initial Setup:

  • Access the TrueNAS web interface at http://<truenas-ip>.
  • Complete the initial setup wizard, including setting the admin password and configuring the network.

Configure Storage Pools:

  • Go to Storage > Pools > Add to create a new storage pool.
  • Select the available disks, configure the RAID level, and create the pool.

Set Up Shares:

  • Go to Sharing and set up SMB, NFS, or iSCSI shares as needed.
  • For SMB, go to Sharing > Windows (SMB) Shares > Add, select the dataset, and configure share settings.

Networking:

  • Ensure TrueNAS is connected to the appropriate network bridges configured in Proxmox.

7. Installing OPNsense as a Virtual Machine

Example Steps:

Download OPNsense:

Create an OPNsense VM in Proxmox:

  • In the Proxmox web interface, go to Datacenter > Node > Create VM.
  • Enter the VM ID and Name.
  • In the OS tab, select Do not use any media.
  • In the CD/DVD tab, select the OPNsense ISO.
  • Allocate resources in the CPU, Memory, and Hard Disk tabs (e.g., 2 CPUs, 2 GB RAM, and a suitable disk size).
  • Add multiple network interfaces for WAN and LAN.

Install OPNsense:

  • Boot the VM and follow the installation wizard to install OPNsense.
  • Assign the interfaces and configure the network during installation.

8. Configuring OPNsense for Network Management

Example Steps:

Initial Setup:

  • Access the OPNsense web interface at http://<opnsense-ip>.
  • Complete the initial setup wizard, including setting the admin password.

Configure Interfaces:

  • Go to Interfaces > Assignments to assign network interfaces to WAN and LAN.
  • Configure the IP address, subnet, and gateway for each interface.

Set Up Firewall Rules:

  • Go to Firewall > Rules > LAN and WAN to create rules for managing traffic.
  • For example, create a rule to allow LAN to WAN traffic:
    • Action: Pass
    • Interface: LAN
    • Source: LAN net
    • Destination: Any

Additional Features:

  • Set up VPN by going to VPN > OpenVPN > Wizards.
  • Configure intrusion detection by going to Services > Intrusion Detection.

9. Integrating Proxmox VE, TrueNAS, and OPNsense

Example Steps:

Network Integration:

  • Ensure all VMs and your Proxmox server are connected through the OPNsense VM for network management.
  • Configure Proxmox VM network settings to use OPNsense as the gateway.

Storage Integration:

  • In Proxmox, go to Datacenter > Storage > Add and choose NFS or iSCSI.
  • Enter the TrueNAS server IP, export path, and configure other settings.

Backup and Snapshots:

  • Configure backups for your VMs by going to Datacenter > Backup.
  • Schedule regular snapshots of storage pools in TrueNAS by going to Tasks > Snapshots > Add.

10. Best Practices and Advanced Tips

Example Steps:

Regular Backups:

  • Schedule regular backups of your VMs and data by setting up jobs in Proxmox and TrueNAS.

Security:

  • Regularly update your systems by running apt update && apt upgrade in Proxmox and using the update features in TrueNAS and OPNsense.
  • Configure strong passwords and enable two-factor authentication where possible.

Resource Allocation:

  • Monitor resource usage using the Proxmox web interface and adjust VM allocations as needed.
  • Ensure you do not over-commit memory and CPU resources to avoid performance issues.

Learning and Experimentation:

  • Use your home lab to experiment with new technologies and configurations.
  • Document your setups and configurations for future reference and to aid in troubleshooting.

By following these detailed steps, you’ll have a robust and flexible home lab environment using Proxmox VE, TrueNAS, and OPNsense.

Other Recent Posts