Prerequisite
- A dedicated server (Pre-installed PVE)
- Public IP address (Optional, but you must be able to access the server)
- Internet
Getting Started 🚀
Download OpenWrt image file
cd /var/lib/vz/template/iso
wget https://downloads.openwrt.org/releases/24.10.3/targets/x86/64/openwrt-24.10.3-x86-64-generic-squashfs-combined-efi.img.gz
gunzip openwrt-24.10.3-x86-64-generic-squashfs-combined-efi.img.gz
You can select other versions and architectures. Click Here
Create an empty virtual machine
- OS tab: Select
Do not use any media - System tab:
- BIOS: SeaBIOS
- Other optional: custom
- Disks tab: Delete all disk
- CPU:
- Select
Advancedand setCPU unitsvalue is1024(Optional) - Other optional: custom
- Select
- Memory tab: custom
- Network tab:
- Bridge: Select a bridge that can access the Internet
- Other optional: custom
- Finish
Import image to virtual machine
- Import image
# 101 is your vm id
# local is your storage name
qm importdisk 101 /var/lib/vz/template/iso/openwrt-24.10.3-x86-64-generic-squashfs-combined-efi.img local
- Double click imported disk in vm hardware menu
- Bus/Device: Select SATA
- Other optional: custom
Set vm boot order and add a network interface card
- Navigate to the vm
Optionsmenu - Double click
Boot Orderoption, and only select just imported disk, and click OK button - Back to
Hardwaremenu - Click
Addbutton and selectNetwork Deviceitem in dropdown- Bridge: Select a bridge [See Tips]
- Other optional: custom
Tips: Can remain in the same VNet as the first NIC, but only allow one gateway (Subnet or OpenWrt) with DHCP enabled
Start the virtual machine and connect to Internet
You need a virtual machine connected to the same bridge as OpenWrt net0
If you don’t have the same vm ? Please create it.
- Enter http://192.168.1.1 in browser
- Navigate to
Networkmenu and selectInterfacesitem - Click
Add new interface...button - Enter some informations:
- Name: You can enter
wan(recommended) or other name - Protocol:
- If your upstream device is enable DHCP, you can select
DHCP Client - If your upstream device is Modem (cat), you should select
PPPoE - Otherwise, select
Static Address
- If your upstream device is enable DHCP, you can select
- Device: Select the last added network device
- Click
Create Interfaceand clickSave & Applybutton - Edit
waninterface:- Firewall Settings:
Create / Assign firewall-zoneoption should selectwanzone - Other optional: Set according to actual situation
DHCPdoesn’t need other configurationPPPoErequires you to fill in the account and password provided by the ISPStatic Addressrequires you to fill in the address, subnet mask and gateway provided by the upstream device
- Firewall Settings:
- Click
Saveand clickSave & Applybutton
- Name: You can enter
Don’t forget change default password.
Completed all configuration 🎉
After that, you can connect the network of other virtual machines to the corresponding bridge, and specify the gateway and IP address and other information to access the Internet.