proxmox-pfsense-OpenWRT-TrueNas

Proxmox + pfSense + OpenWRT + TrueNAS

License: MIT PRs Welcome Maintenance

A comprehensive guide and automation toolkit for setting up and managing a powerful virtualized home or small business network environment using Proxmox, pfSense, OpenWRT, and TrueNAS.

๐Ÿš€ Quick Start

Prerequisites

Quick Commands

# Check system requirements
make check

# Install required dependencies
make setup

# Deploy pfSense VM
make deploy-pfsense

# Backup your VMs
make backup

๐Ÿ“‹ Table of Contents

โœจ Features

๐Ÿ“ Project Structure

.
โ”œโ”€โ”€ scripts/                  # Automation scripts
โ”‚   โ”œโ”€โ”€ check_prerequisites.sh  # System requirements check
โ”‚   โ”œโ”€โ”€ deploy_pfsense_vm.sh    # pfSense VM deployment
โ”‚   โ”œโ”€โ”€ deploy_openwrt_vm.sh    # OpenWRT VM deployment (coming soon)
โ”‚   โ”œโ”€โ”€ deploy_truenas_vm.sh    # TrueNAS VM deployment (coming soon)
โ”‚   โ””โ”€โ”€ backup_vms.sh          # Backup solution for VMs
โ”œโ”€โ”€ docs/                     # Additional documentation
โ”‚   โ”œโ”€โ”€ networking/           # Network configuration guides
โ”‚   โ”œโ”€โ”€ security/             # Security best practices
โ”‚   โ””โ”€โ”€ troubleshooting/      # Common issues and solutions
โ”œโ”€โ”€ .gitignore               # Git ignore file
โ”œโ”€โ”€ LICENSE                  # MIT License
โ”œโ”€โ”€ Makefile                 # Project automation
โ””โ”€โ”€ README.md               # This file

๐Ÿš€ Getting Started

Prerequisites

Installation

  1. Clone the repository:
    git clone https://github.com/tom-sapletta-com/proxmox-pfsense-OpenWRT-TrueNas.git
    cd proxmox-pfsense-OpenWRT-TrueNas
    
  2. Install dependencies:
    make setup
    
  3. Make scripts executable:
    make install
    

๐Ÿ› ๏ธ Usage

Deploying VMs

pfSense Firewall/Router

make deploy-pfsense

Or manually:

sudo ./scripts/deploy_pfsense_vm.sh \
  --id 100 \
  --name "pfsense" \
  --memory 2048 \
  --cores 2 \
  --storage local-lvm \
  --iso /path/to/pfSense-*.iso

OpenWRT (Coming Soon)

make deploy-openwrt

TrueNAS (Coming Soon)

make deploy-truenas

Backup & Recovery

Create a backup of all VMs and containers:

make backup

Or customize the backup:

sudo ./scripts/backup_vms.sh \
  --dir /mnt/backup/proxmox \
  --compression zstd \
  --max 7 \
  --exclude 101,102

Maintenance

Check system requirements:

make check

Clean up temporary files:

make clean

๐Ÿ“š Documentation

For detailed documentation, please refer to the following resources:

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ‘จโ€๐Ÿ’ป About the Author

Tom Sapletta is a technology enthusiast and software developer with a passion for:

Connect with me:

download image

  1. Download the latest AMD64 DVD Image (ISO) installer from the pfSense website.
  2. Upload the ISO that was just downloaded to the Proxmox server.
  3. Select Create VM in the top right corner.

Before we look at how to install pfSense on Proxmox, ensure that you have a NIC installed in your Proxmox server as weโ€™ll have to use this to pass it through to our pfSense virtual machine.

  1. Give the VM a name, then check off start at boot. Select next to proceed.
  2. Select the pfSense ISO image and then select next.
  3. In the network section, select no network device, then select next.

Proxmox

Virtualisation

qm monitor <vmid>       connect to vm control monitor
qm start <vmid>         start vm
qm reboot <vmid>        reboot vm (shutdown, start)
qm shutdown <vmid>      gracefully stop vm (send poweroff)
qm stop <vmid>          kill vm (immediate stop)
qm reset <vmid>         reset vm (stop, start)
qm suspend <vmid>       suspend vm
qm resume <vmid>        resume vm
qm destroy <vmid>       destroy vm (delete all files)

qm cdrom <vmid> [<device>] <path>  set cdrom path. <device is ide2 by default>
qm cdrom <vmid> [<device>] eject   eject cdrom

qm unlink <vmid> <file>  delete unused disk images
qm vncproxy <vmid> <ticket>  open vnc proxy
qm list                 list all virtual machines

BIOS

When creating the VM:

add the new network card to proxmox usage and use embedded cards to pfsense directly from PCI

image

image

image

Proxmox virtualized Net

pfSenseยฎ software Configuration Recipes โ€” Virtualizing with Proxmoxยฎ VE - pfSense Documentation

pfsense Installation

CONFIG

After the virtual machine reboots, the console will stop at an interfaces assignment prompt.

Network

How to reload /etc/network/interfaces in Ubuntu or Debian

In Ubuntu or Debian desktop, Network Manager is the default network configuration tool, whereas Ubuntu server by default uses /etc/network/interfaces to configure network interfaces. Of course, even on desktop, you can disable Network Manager, and use /etc/network/interfaces instead to configure your networking.

For those of you who use /etc/network/interfaces to configure network interfaces, if you modify /etc/network/interfaces, you need to reload it so that the new configuration can take effect.

(adsbygoogle = window.adsbygoogle ย  []).push({});

Here is how you can reload /etc/network/interfaces.

sudo service networking restart

Note: If Network Manager is installed and enabled on your system, you must not use /etc/network/interfaces to configure networking, and any change made in /etc/network/interfaces will be ignored by Network Manager. You need to use Network Manager to configure your network interfaces. In that case, after network settings are modified, you can restart Network manager as follows.

sudo service network-manager restart

Additional Resources

Proxmox

pfSense

OpenWRT

TrueNAS

Network Configuration

Troubleshooting

Security

Community & Support

YouTube Channels

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

Acknowledgments

Subnet Cheat Sheet โ€“ 24 Subnet Mask, 30, 26, 27, 29, and other IP Address CIDR Network References

image

TEST COnfig

Tutorials: