Forget the cable mess, it’s time to virtualize your Router!
Back when I first started building a Lab to learn Linux or test Docker, I used to go crazy over the mess of network cables dangling from the old router under my desk. Every time I wanted to split a VLAN or change an IP range, I had to plug and unplug manually. Not to mention, with a low-end router, a single configuration mistake meant a hard reset and an hour wasted on setup.
Currently, I manage about 15 Virtual Machines and Containers on a single Proxmox node. The secret to keeping everything neat is turning OpenWrt into a Virtual Router. It acts as the “head of the house,” handling DHCP and filtering traffic for the entire system. With just a mini PC running Proxmox, you can create a complex network topology without needing a single extra LAN cable.
Why OpenWrt instead of pfSense?
pfSense and OPNsense are indeed powerful, but they are notorious “resource hogs.” A basic pfSense instance usually consumes at least 2GB of RAM. With OpenWrt, it’s a completely different story. I only allocate 256MB of RAM and 1 CPU Core, yet it still handles 1Gbps bandwidth with ease, with CPU usage rarely exceeding 5%.
My favorite feature is Proxmox Snapshots. Before experimenting with ad-blocking plugins or complex VPN configurations, I can create a backup in just 2 seconds. If I accidentally break the network, I just hit ‘Rollback’ and everything returns to a stable state immediately.
Step-by-Step Implementation Guide
Step 1: Download the OS Image
OpenWrt is not installed via a standard ISO file. You need to download a disk image (.img). Visit the homepage and select the Generic x86-64 version.
Pro tip: Prioritize the combined-ext4.img.gz version. The ext4 format makes it incredibly easy to expand your disk space later if you install too many software packages. You can use the wget command to download it directly to Proxmox for speed:
# Navigate to the storage directory
cd /var/lib/vz/template/iso
# Download the OpenWrt image (example 23.05.0)
wget https://downloads.openwrt.org/releases/23.05.0/targets/x86/64/openwrt-23.05.0-x86-64-generic-ext4-combined.img.gz
# Extract the file
gunzip openwrt-23.05.0-x86-64-generic-ext4-combined.img.gz
Step 2: Create the VM “Shell” on Proxmox
We will build an empty VM framework before loading the OS:
- Select Create VM, set ID to 100, and name it “OpenWrt-Core”.
- OS section: Select “Do not use any media”.
- Disks section: Delete the default disk. We will import it via command line later.
- CPU section: 1 Core is enough. Set Type to ‘host’ for instruction set optimization.
- Memory section: Set to 256MB or 512MB if you plan to install many apps.
- Network section: Select Bridge
vmbr0(This will be the WAN port for Internet access).
Step 3: Load the Disk using the qm importdisk Command
This is the key step. We need to convert the .img file into a disk format that Proxmox understands. Go back to the terminal and run:
# Syntax: qm importdisk <VM_ID> <FILE_NAME> <STORAGE_NAME>
qm importdisk 100 openwrt-23.05.0-x86-64-generic-ext4-combined.img local-lvm
Once finished, go back to the Proxmox interface -> VM 100 -> Hardware. An “Unused Disk 0” will appear. Double-click it and select Add. Don’t forget to go to Options -> Boot Order to prioritize this disk at the top.
Step 4: Set up the Local Network (LAN)
To act as a router, the VM needs at least two interfaces: one to receive the connection (WAN) and one to distribute it (LAN).
- WAN Port: The
vmbr0created earlier. - LAN Port: Go to the Network section in Proxmox and create a new Linux Bridge (e.g.,
vmbr1). Note: Do not fill in anything in the Bridge ports field. This will be an isolated virtual network dedicated to the VMs in your Lab.
Finally, go to the Hardware section of the OpenWrt VM, select Add -> Network Device, and point it to vmbr1.
Configure OpenWrt in a Flash
Start the VM and open the Console. When the screen shows the OpenWrt logo, press Enter. By default, its IP is 192.168.1.1, which likely conflicts with your home router. Let’s change it:
vi /etc/config/network
Change the line option ipaddr '192.168.1.1' to a different range, for example, 10.0.0.1. Save and type the command to apply changes: /etc/init.d/network restart.
Now, simply take any VM (e.g., Windows 10) and change its network card to vmbr1. That VM will receive an IP from OpenWrt, and you can access the LuCI interface at http://10.0.0.1.
Pro Tips from Real-world Usage
After a long period of use, here are some hard-earned lessons:
- Security immediately: The first thing to do in the Web UI is set a Root password. Do not leave it blank; it’s very dangerous if you open ports.
- Optimize speed: Select the network card model as
VirtIOto achieve internal transfer speeds up to 10Gbps. Avoid E1000 unless you encounter compatibility issues. - Useful packages: Install
luci-app-wireguard. This allows you to VPN back home and access all your Lab VMs as if you were sitting in a coffee shop.
Conclusion
Using OpenWrt on Proxmox is not just about saving resources; it’s about a professional network management mindset. You will have full control over firewalls, bandwidth, and services for each VM without spending a penny on separate hardware. If you want to level up your SysAdmin skills, this is the first practical exercise you should try. Good luck building your perfect Lab system!

