[TUTORIAL] HOWTO - Proxmox VE 8-x.x Wifi with routed configuration

please show your config, /etc/network/interfaces and /etc/network.d/
and also iptable -L -t nat

# https://pve.proxmox.com/wiki/Network_Configuration

Code:
root@pve:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback

iface enp2s0 inet manual

auto wlo1
iface wlo1 inet manual
        address 192.168.50.20/24
        gateway 192.168.50.1

auto vmbr0
iface vmbr0 inet static
    address 192.168.51.1/24
    bridge-ports none
    bridge-stp off
    bridge-fd 0

auto vnet1
iface vnet1 inet static
    address 192.168.52.1/24
    bridge-ports none
    bridge-stp off
    bridge-fd 0
    hwaddress 6e:08:e2:74:e7:61
    post-up echo 1 > /proc/sys/net/ipv4/ip_forward
    post-up iptables -A FORWARD -i wlo1 -j ACCEPT
    post-up iptables -A FORWARD -o wlo1 -j ACCEPT
    post-up iptables -A FORWARD -i vnet1 -j ACCEPT
    post-up iptables -A FORWARD -o vnet1 -j ACCEPT

Code:
root@pve:~# cat /etc/network.d
cat: cannot access '/etc/network.d': No such file or directory

I have network and networks in /etc though.

Code:
root@pve:~# iptables -L -t nat
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination        

Chain INPUT (policy ACCEPT)
target     prot opt source               destination        

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination        

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
 
Last edited:
Thanks - traceroute to another host gives:

Code:
user@debian:~$ traceroute 192.168.50.246
traceroute to 192.168.50.246 (192.168.50.246), 30 hops max, 60 byte packets
1 debian (169.254.11.14) 3077.298 ms !H 3077.283 ms !H 3077.278 ms !H

vnet1 is 192.168.52.1, pinging just hangs (no message, blinking cursor):

Code:
user@debian:~$ ping 192.168.52.1
PING 192.168.52.1 (192.168.52.1) 56(84) bytes of data.
_

Router gateway 192.168.50.1 is unreachable:

Code:
user@debian:~$ ping 192.168.50.1
PING 192.168.50.1 (192.168.50.1) 56(84) bytes of data.
From 169.254.11.14 icmp_seq=1 Destination Host Unreachable
From 169.254.11.14 icmp_seq=2 Destination Host Unreachable
From 169.254.11.14 icmp_seq=3 Destination Host Unreachable

Ping is failing from the VM to the vnet1 interface 192.168.52.1. Check your VM Hardware configuration. Check the Network Device and ensure it is bridged to vnet1. My guess is the Network Device is bridged to vmbr0, which is a network blackhole.
 
Yes, the "Bridge" for the virtual network interface for VM's and containers should be set to vnet1 based on the example that I posted. The vnet1 is essentially a virtual switch. In SDN terms, it's referred to as a Bridge even though the wireless interface doesn't bridge to a physical adapter.
Can I use the default vmbr0 to replace vnet1 as the bridge, I have tried this, but it doesn't work, I wonder why it doesn't work, but vnet1 can work, thank you very much
 
Can I use the default vmbr0 to replace vnet1 as the bridge, I have tried this, but it doesn't work, I wonder why it doesn't work, but vnet1 can work, thank you very much

No. You can't bridge the physical wifi adapter (unless your wifi access point supports WDS mode). That's why I wrote the Tutorial.
 
Got the host connected to internet via Wifi. Stuck on getting guest Windows VM connected to internet.
I added vnet1 as network device to the Windows VM.

But when I tried to do
Code:
route add 192.168.3.0 MASK 255.255.255.0 192.168.0.1
on Windows, I get
Code:
The route addition failed: Element not found.
response.
My '/etc/network/interfaces' is same as original post except router ip(gateway) is 192.168.0.1 and address for vmbr0 is 192.168.0.200.

Any advice would be helpful.

Update: Realized I need to give interface number. It gave OK after that but still no internet.
 
Last edited:
Got the host connected to internet via Wifi. Stuck on getting guest Windows VM connected to internet.
I added vnet1 as network device to the Windows VM.

But when I tried to do
Code:
route add 192.168.3.0 MASK 255.255.255.0 192.168.0.1
on Windows, I get
Code:
The route addition failed: Element not found.
response.
My '/etc/network/interfaces' is same as original post except router ip(gateway) is 192.168.0.1 and address for vmbr0 is 192.168.0.200.

Any advice would be helpful.

Update: Realized I need to give interface number. It gave OK after that but still no internet.

You do not need to manually add routes to VM's. Static routes only need to be added to hosts on your local network so they can access hosts on the vnet1 subnet. For your Windows VM, simply configure the Gateway setting to use the IP address of the vnet1 interface of the Proxmox server.
 
You do not need to manually add routes to VM's. Static routes only need to be added to hosts on your local network so they can access hosts on the vnet1 subnet. For your Windows VM, simply configure the Gateway setting to use the IP address of the vnet1 interface of the Proxmox server.
I set the Windows VM like this:
1753429654415.png
Windows Diagnosis tool says:
1753429857937.png
(I hope gateway IP here should not be actual router IP(i.e, 192.168.0.1). I tried that and Windows Network Diagnostic thing said 'Unable to access DNS server'. Pings didn't work so DNS isn't the only issue with 192.168.0.1)

And on my host/Proxmox:
Code:
> cat /etc/network/interfaces
auto lo
iface lo inet loopback

iface enp1s0 inet manual

auto wlp2s0
iface wlp2s0 inet static
        address 192.168.0.100/24
        gateway 192.168.0.1
        # netmask 255.255.255.0

auto vmbr0
iface vmbr0 inet static
        address 192.168.0.200/24
        gateway 192.168.0.1
        bridge-ports enp1s0
        bridge-stp off
        bridge-fd 0

auto vnet1
iface vnet1 inet static
        address 192.168.3.1/24
        bridge-ports none
        bridge-stp off
        bridge-fd 0
        hwaddress 46:01:d9:f7:8c:6b
        post-up echo 1 > /proc/sys/net/ipv4/ip_forward
        post-up iptables -A FORWARD -i wlp2s0 -j ACCEPT
        post-up iptables -A FORWARD -o wlp2s0 -j ACCEPT
        post-up iptables -A FORWARD -i vnet1 -j ACCEPT
        post-up iptables -A FORWARD -o vnet1 -j ACCEPT

source /etc/network/interfaces.d/*
 
I set the Windows VM like this:
View attachment 88388
Windows Diagnosis tool says:
View attachment 88389
(I hope gateway IP here should not be actual router IP(i.e, 192.168.0.1). I tried that and Windows Network Diagnostic thing said 'Unable to access DNS server'. Pings didn't work so DNS isn't the only issue with 192.168.0.1)

And on my host/Proxmox:
Code:
> cat /etc/network/interfaces
auto lo
iface lo inet loopback

iface enp1s0 inet manual

auto wlp2s0
iface wlp2s0 inet static
        address 192.168.0.100/24
        gateway 192.168.0.1
        # netmask 255.255.255.0

auto vmbr0
iface vmbr0 inet static
        address 192.168.0.200/24
        gateway 192.168.0.1
        bridge-ports enp1s0
        bridge-stp off
        bridge-fd 0

auto vnet1
iface vnet1 inet static
        address 192.168.3.1/24
        bridge-ports none
        bridge-stp off
        bridge-fd 0
        hwaddress 46:01:d9:f7:8c:6b
        post-up echo 1 > /proc/sys/net/ipv4/ip_forward
        post-up iptables -A FORWARD -i wlp2s0 -j ACCEPT
        post-up iptables -A FORWARD -o wlp2s0 -j ACCEPT
        post-up iptables -A FORWARD -i vnet1 -j ACCEPT
        post-up iptables -A FORWARD -o vnet1 -j ACCEPT

source /etc/network/interfaces.d/*

The screenshot shows you have assigned Windows the IP address of 192.168.3.0. That is not a valid IP address for the configuration you're using. Your vnet1 subnet is 192.168.3.0/24. You cannot assign an IP address of 192.168.3.0 based on the subnet range you have chosen. Assign your Windows host an address between 192.168.3.2 - 192.168.3.254. You cannot assign the Windows host the 192.168.3.1 address because that is in use by the Proxmox vnet1 interface.
 
The screenshot shows you have assigned Windows the IP address of 192.168.3.0. That is not a valid IP address for the configuration you're using. Your vnet1 subnet is 192.168.3.0/24. You cannot assign an IP address of 192.168.3.0 based on the subnet range you have chosen. Assign your Windows host an address between 192.168.3.2 - 192.168.3.254. You cannot assign the Windows host the 192.168.3.1 address because that is in use by the Proxmox vnet1 interface.
That makes sense. So let Windows VM be 192.168.3.101 and gateway be 192.168.3.1.
1753538320502.png

VM's Hardware:
1753537910022.png

Inside the VM, Ethernet 3 is net0(bridge=vmbr0) and Ethernet 6 is net1(bridge=vnet1):
1753537974975.png
Ignore extra adapters, it's a migrated Windows VM.
Unfortunately, still no internet:
1753538180005.png
Pings:
1753538446423.png
1753538468183.png
1753538503030.png

I feel like I am missing something basic or obvious at this point.
 
Last edited:
That makes sense. So let Windows VM be 192.168.3.101 and gateway be 192.168.3.1.
View attachment 88438

VM's Hardware:
View attachment 88435

Inside the VM, Ethernet 3 is net0(bridge=vmbr0) and Ethernet 6 is net1(bridge=vnet1):
View attachment 88436
Ignore extra adapters, it's a migrated Windows VM.
Unfortunately, still no internet:
View attachment 88437
Pings:
View attachment 88439
View attachment 88440
View attachment 88441

I feel like I am missing something basic or obvious at this point.

The only thing that is notable in the screenshots you posted is that you have 2 Network Devices for the VM. Is there a reason why you created the VM with 2 Network Devices? You only need 1 Network Device for the VM and it should be bridge to vnet1. As no one else has had this issue it would seem you may have missed a step somewhere.

I would also suggest asking for assistance in the Unofficial Proxmox Discord. You can access it at https://discord.gg/vmP5EvRw
 
Last edited:
The only thing that is notable in the screenshots you posted is that you have 2 Network Devices for the VM. Is there a reason why you created the VM with 2 Network Devices? You only need 1 Network Device for the VM and it should be bridge to vnet1. As no one else has had this issue it would seem you may have missed a step somewhere.

I would also suggest asking for assistance in the Unofficial Proxmox Discord. You can access it at https://discord.gg/vmP5EvRw
One network device was for bridge(vmbr0) to LAN and another for bridge(vnet1) to wifi.
 
I signed up to thank you for this guide. I needed a laptop with Proxmox and Home Assistant that I could easily move between networks. The cheap TP-Link TL-WR802N in WISP mode serves as the router, and I can power it from my laptop's USB port. I simply connect the router to the Wi-Fi network at a given location, and HA VM is able to reach devices on that network, and the internet. Great stuff, thanks again!

The only thing I had to add was putting the new Proxmox IP address (192.168.2.1) in /etc/hosts.
 
I signed up to thank you for this guide. I needed a laptop with Proxmox and Home Assistant that I could easily move between networks. The cheap TP-Link TL-WR802N in WISP mode serves as the router, and I can power it from my laptop's USB port. I simply connect the router to the Wi-Fi network at a given location, and HA VM is able to reach devices on that network, and the internet. Great stuff, thanks again!

The only thing I had to add was putting the new Proxmox IP address (192.168.2.1) in /etc/hosts.

You're welcome. Always good to hear feedback from folks who i've freed from the cord.
 
So, I have a question: why do you enable wpa_supplicant specifically for that interface? I would keep it disabled and use just `/etc/network/interfaces` to control everything.

For example:

Code:
allow-hotplug wlp6s0
iface wlp6s0 inet static
    address 192.168.5.10/24
    gateway 192.168.5.1
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

In fact, if you use your router's DHCP to assign a specific address to the adapter's wireless address, you can simply:

Code:
allow-hotplug wlp6s0

iface wlp6s0 inet dhcp

    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

    gateway 192.168.5.1

When I reboot this launches wpa_supplicant to manage the interface:

Code:
root@proxmox:~# ps -ef | grep wpa
root        5850       1  0 20:22 ?        00:00:00 /usr/sbin/wpa_supplicant -s -B -P /run/wpa_supplicant.wlp6s0.pid -i wlp6s0 -D nl80211,wext -c /etc/wpa_supplicant/wpa_supplicant.conf

Does proxmox come with wpa_supplicant.service enabled by default or not?
 
Last edited:
So, I have a question: why do you enable wpa_supplicant specifically for that interface? I would keep it disabled and use just `/etc/network/interfaces` to control everything.

I'm not a wpa_supplicant expert and used those instructions because it was something I came across from other tutorials. If there is a simpler method for bringing up the wireless interface I'm all for it. For my own purposes, I prefer to specify the interface address in the local host network configuration file. As you've pointed out, you can also use a DHCP reservation. The reason I prefer staticly assigning the address on the host is it simplifies troubleshooting by removing DHCP as another link in the chain. If i need to troubleshoot anything I know exactly what the host source address is.
 
Last edited: