Creating a Travel Router/Server With Proxmox

Why I Decided to Make a Travel Router

I started looking for ways to create my own Wi-Fi network within a pre-existing Wi-Fi network, so at my college dorm room I could have a personal network to connect my security cameras and printer to. I ended up finding out about travel routers like the GL-iNet Beryl AX.

GL-iNet Beryl AX

The GL-iNet Beryl AX uses a modified verison of OpenWrt. I decided to make my own travel router using OpenWrt. OpenWrt is an open-source operating system for routing network traffic. By further researching OpenWrt and travel routers, I found a Network Chuck video on creating a travel router with a Raspberry Pi and OpenWrt.

With my previous experience tinkering with Proxmox, a virtualisation platform for managing virtual machines and containers, in the summer of 2023, I decided that I could use an old laptop to create a personal travel router with smart home automation software, a fileserver, a network video recorder, and a nice little UI to access all of it.

Materials Needed

First, you will need a computer to install Proxmox on. I found someone that had an old laptop that I could use.

ASUS Q304UA

Next, you will need at least 2 Wi-Fi adapters. Before buying the Wi-Fi adapters, make sure that they are supported by OpenWrt. You can check if your Wi-Fi adapter is supported by visiting the OpenWrt forums. I went with the MediaTek MT7612U and MediaTek MT7610U chipsets.

Panda Wireless PAU0A
Panda Wireless PAU0C

Note: After using the PAU0C for a while, it seemed to stop working and is now not detected by my computer. The Panda Wireless PAU0B is what I replaced it with. It seems have to have a farther range than the PAU0C.

Panda Wireless PAU0B

Also, you will need a USB flash drive for installing the Proxmox ISO on.

PNY Attaché 4 16G Flash Drive

In my build, I also plugged in a Zigbee dongle for smart home automation in Home Assistant.

SONOFF Zigbee Dongle Plus

Also, I had to use some USB extension cables because the USB ports on my laptop were too close together to fit both Wi-Fi adapters.

Side View of Laptop
Monoprice 3-Feet Extension Cable

Creating Proxmox Installation Medium

The first step in the travel router setup is installing Proxmox. Proxmox is a virtualization platform that allows for easy deployment and management of virtual machines and containers.

In order to install Proxmox, we first have to create an installation medium. We need to download the Proxmox Virtual Environment ISO from the Proxmox website.

Proxmox VE Download Page

You can get the ISO here:

https://www.proxmox.com/en/downloads/proxmox-virtual-environment/iso

After installing the ISO, you will need to flash it to your USB stick.

Balena Etcher

You can download software for flashing your USB drive here: https://etcher.balena.io/#download-etcher.

Make sure that before you flash Proxmox onto your USB drive, you take all important files off your USB drive because they will be deleted in the flashing process.

Installing Proxmox

The next step is installing Proxmox on your computer. First plug in your USB with the Proxmox installer on it. Then, turn on your computer and look for a message on the screen indicating the key to press to access the BIOS. Press this key to enter your computer’s BIOS.

Asus Laptop BIOS

From here, you can change the boot order to boot from the USB first. Then, save the BIOS changes and reboot.

Proxmox Installation Screen

From here you can go through the graphical installation process.

You will be asked what storage drive to install Proxmox on. Any data on the drive will be deleted when installing Proxmox, so make sure any important data is backed up.

In the installer you will be asked to enter your location, time zone, password, email, and network settings.

If you need help with the installation you can visit here: https://pve.proxmox.com/wiki/Installation

Updating and Configuring Proxmox

When you are finished installing you can reboot and remove your USB Proxmox installation drive. After you reboot, you should see a screen like this:

Proxmox Console

Login with the username ‘root’ and the password entered during the install.

The first step is to disable Proxmox commercial repos and enable no-subscription repos.

Type this into the terminal:

nano /etc/apt/sources.list

Delete the commercial repos and add the no-subscription repos. Your file should look like this:

deb http://ftp.debian.org/debian bookworm main contrib
deb http://ftp.debian.org/debian bookworm-updates main contrib

# Proxmox VE pve-no-subscription repository provided by proxmox.com,
# NOT recommended for production use
deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription

# security updates
deb http://security.debian.org/debian-security bookworm-security main contrib

Save and quit out of nano. Then enter this:

nano /etc/apt/sources.list.d/pve-enterprise.list

Once you are editing the file, you should comment out the repo. Your file should look like this:

# deb https://enterprise.proxmox.com/debian/pve bookworm pve-enterprise

Exit out of nano. Now we have to update the list of available packages. Run this command:

apt update

After updating, we need to upgrade our packages.

apt upgrade

After upgrading, we can install required packages:

apt install xfce4 chromium lightdm sudo

These packages allow us to access the Proxmox web interface from the laptop.

Next, we need to create a user. Type in:

adduser yourusername

Enter the username you wish to use in the place of yourusername.

passwd yourusername
usermod -aG sudo yourusername

Reboot Proxmox by running:

reboot

After the reboot, you should be brought to a login screen. Login with the user you just created and open the web broswer.

Using the web browser, enter the URL: https://localhost:8006/. (If you get a connection not private error, click continue. This error happens because your server doesn’t have an SSL certificate)

You will be directed to the Proxmox web interface.

Proxmox Webgui Login

Login with root.

Virtual Machines vs Containers

In Proxmox, you can create both virtual machines and containers. Containers contain a full operating system except for the kernel which is shared with the host, while a virtual machine is a complete emulation of a computer system. Virtual machines normally take more system resources, but are more secure because they are completely isolated from the host system.

When creating Virtual machines, you must allocate CPU cores from your computer, which cannot be used by the host. Because I am using a old laptop with only 4 cores, I decided to use containers when creating my server.

Setting up OpenWrt

The first container we are going to setup is OpenWrt. This is so we can use it for networking with the other containers.

First step is to create a new linux bridge.

Proxmox PVE Network Settings

You can do this by navigating to your pve node and clicking on network settings, then create the linux bridge by clicking create.

Promox Bridge Creation

You can leave all of the settings blank.

The next step is downloading the OpenWrt image.

Go to: https://images.linuxcontainers.org/images/openwrt and copy the link to the newest image of OpenWrt. The file is called rootfs.tar.xz.

OpenWrt Image Download

An example of the link to copy is: https://images.linuxcontainers.org/images/openwrt/23.05/amd64/default/20240901_11%3A57/rootfs.tar.xz

Next, go to the Proxmox shell and run the command:

wget https://images.linuxcontainers.org/images/openwrt/23.05/amd64/default/20240901_11%3A57/rootfs.tar.xz

Replace with the link that you copied earlier.

After downloading the file, you can run:

pct create 100 ./rootfs.tar.xz --unprivileged 1 --ostype unmanaged --hostname openwrt --net0 name=eth0 --net1 name=eth1 --storage local-lvm

You can replace 100 with the container ID you want, the hostname you want, and the storage that you want to use(default is local-lvm).

Now that an OpenWrt container has been created, we have to link the container’s network devices with the linux bridges we created earlier.

OpenWrt Network Devices

Go to your OpenWrt container’s network settings and select a bridge for eth0(this should be the one that you are using to get internet from Proxmox) and the other bridge for eth1(this is the one we just created). There will be an error when selecting the first bridge, but you can close the error and window, and when you select the second bridge for the second network device, the error will be fixed.

Next, we need to change the OpenWrt container config to passthrough the Wi-Fi dongles and settings that allow us to set up a VPN.

Go to Proxmox shell and type in the command:

ip a

You should get an output of a lot of devices. Try to find both of your Wi-Fi adapters. Copy down their names. In this example, mine are wlx9cefd5fb2f2f and wlx9cefd5f8f629.

Next, type in this command:

nano /etc/pve/lxc/100.conf

Replace 100 with the container ID you used earlier. Once editing the file, add these settings to the bottom of the configuration file. Replace wlx9cefd5fb2f2f and wlx9cefd5f8f629 with the names of your Wi-Fi dongles.

lxc.net.3.type: phys
lxc.net.3.link: wlx9cefd5fb2f2f
lxc.net.3.flags: up
lxc.net.3.name: wlan0
lxc.net.4.type: phys
lxc.net.4.link: wlx9cefd5f8f629
lxc.net.4.flags: up
lxc.net.4.name: wlan1
lxc.cgroup2.devices.allow: c 10:200 rwm
lxc.mount.entry: /dev/net dev/net none bind,create=dir

Now, you can start your container.

Once the container is started, go into the OpenWrt console and type in the command:

vi /etc/config/firewall

Add this to the bottom of the file:

config rule                                          
        option src 'wan'                             
        option dest_port '80 443'                    
        option proto 'tcp'                           
        option target 'ACCEPT'

Note: to enter text in vi you have to press the ‘i’ key, then enter the text. After you are done, press ‘esc’ and ‘:wq’ to save and quit.

These settings allow you to access the OpenWrt web interface. In order to access the web interface, we need an ip address. Run this command in the container:

ip a

Find the IP associated with your container and go to the IP address in a new browser tab.

Example: http://192.168.1.19

OpenWrt Webgui

You should get to a page with a login screen, press log in. There is no password set up yet.

OpenWrt Password Configuration

Click on the warning and set up a password.

After this, go to the Network tab and click on Interfaces. From here, click on Devices. Then, add a device configuration. Select bridge device for device type. Type in br-lan for device name and select eth1 as bridge ports. Click save.

OpenWrt Bridge Device Creation

Next, go back to Interfaces and add a new interface.

Use the protocol: static address and the device: br-lan. You can enter the IP address you want the router to have in the IP address section.

OpenWrt Br-lan Creation

Next, navigate to System and go to Software. Click on the update lists button.

OpenWrt Software

After updating, type in and install the following packages:

wpa-supplicant
hostapd
kmod-mt76x2u
kmod-mt76x0u
openvpn-openssl
luci-app-openvpn

Note: kmod-mt76x2u and kmod-mt76x0u are the wireless drivers for the Wi-Fi adapters listed in this article. If you have different ones, you will have to download the correct drivers for your adapters. Openvpn-openssl and luci-app-openvpn are used for setting up a VPN in OpenWrt.

After installing these packages, you should now see Wireless in the Network tab. Go to Wireless. Here you should see your two Wi-Fi adapters that you passed through.

First, we will setup the access point Wi-Fi adapter. Click on the add button on the Wi-Fi adapter you want to use. Select the operating settings you want to use. For the mode select access point. Create a ESSID, this will be the name of your Wi-Fi network and select lan as your network.

OpenWrt Access Point Creation

To add a password to your Wi-Fi network, click on Wireless Security and change the encryption type and create a password.

OpenWrt Wireless Encryption

Next, we will setup the client Wi-Fi adapter. Click the scan button on the Wi-Fi adapter you wish to use. From here you can connect to your pre-existing Wi-Fi network.

From here, your router should be mostly setup. Test your network by connecting a device.

Here is a video helping with the process of setting up a basic OpenWrt container:

Making Proxmox Use OpenWrt Bridge

Futher, if you want your Proxmox server to get internet access from OpenWrt, you can create another linux bridge by going to your Proxmox pve node and clicking on Network. Enter the IP you want Proxmox to have and the OpenWrt IP address under gateway.

Proxmox Linux Bridge Creation

Next, go to your OpenWrt container network settings and create a new network device using your new bridge and IP settings.

OpenWrt Network Device Creation

Now, from the OpenWrt web interface you can add eth2 to your br-lan device by going to the Network tab, clicking on Interfaces, then on Devices. Configure your br-lan devices as follows:

OpenWrt Br-lan Configuration

Proxmox should be getting internet from OpenWrt now.

Setting up Network Settings in Other VMs and Containers

Setting up other VMs and containers network settings is simple.

Go to the container you want to setup. Add a network device and select the bridge you used for creating your lan in OpenWrt. I used vmbr1. Enter the IP you wish for your container to have and the Gateway is the IP of OpenWrt.

Proxmox Container Network Device Creation

Setting up a VPN in OpenWrt

The first step in setting up a VPN is to get a ovpn file. Search online for the ovpn configuration for your VPN provider.

Once you have your configuration file, in the OpenWrt web interface, go to VPN and click on OpenVPN. At the bottom of the screen you can upload a configuration file. Create a name for your VPN and upload your configuration file.

OpenWrt OpenVPN Configuration File Upload

The next step is to edit your VPN configuration settings. Click on edit. Add the path to the file it says below: /etc/openvpn/yourvpnname.auth. This should be entered after auth-user-pass. Type in your username and password from your VPN provider in the text box at the bottom of the screen.

OpenWrt OpenVPN Configuration

Next, go to OpenWrt Network Interface settings and add new interface. Give it a name, leave the protocol DHCP client, and type in a custom device: tun0.

Next, go to OpenWrt Network Firewall and edit the wan zone. Add your tunnel device to the covered networks.

Lastly, check enabled on your VPN instance and click on start.

OpenVPN Instances

If you wish to setup OpenWrt with NordVPN, here is an article for how to do it: https://support.nordvpn.com/hc/en-us/articles/20340177222289-OpenWrt-setup-with-NordVPN

What Else I Run on My Server

Home Assistant

I run Home Assistant to manage my smart lights and to automate them using the Adaptive Lighting HACS integration. This integration changes the color temperature and brightness of my lights based on the time of day.

Home Assistant

Home Assistant: https://www.home-assistant.io/

Adaptive Lighting Integration Github: https://github.com/basnijholt/adaptive-lighting?tab=readme-ov-file

Fileserver

I set up a basic Samba fileserver using Debian to transfer files between devices.

Here’s a good video on how to set it up:

Frigate

I am experimenting with using Frigate for AI object detection with an ESP32-Cam.

Frigate Github: https://github.com/blakeblackshear/frigate

Homepage

Homepage is the application dashboard I use. It allows me to easily navigate to all of my containers without remembering the IP and port number to access them.

Homepage Configuration

Homepage: https://gethomepage.dev/latest/

Further Customizing Your Server

If you would like to further customize your server, you can find resources here:

Proxmox VE Helper-Scripts: https://tteck.github.io/Proxmox

Proxmox Wiki: https://pve.proxmox.com/wiki/Main_Page

Conclusion

Thank you for following along with this guide. After reading all of this, I hope you’re inspired to go out and make your own server. This project was created in order to fit my specific use case and was built with the parts I had available to me. By using Proxmox, you can create a versatile setup that meets a variety of needs that fit your specific use case. Thanks for reading and I hope that you have found this information useful.

What unique use cases do you have in mind for your Proxmox setup? Share your ideas or any additional configurations you’ve tried in the comments—I’d love to hear how you’re customizing your Proxmox server!


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *