[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.