pve7. 2-3 can use wifi bridge to vm?

tangz

New Member
Jun 9, 2022
4
0
1
i want vm create a nic bridge to wifi port, but it can not be configed.

in pve web console
1654752481017.png
and wlp41s0 cann't be edit

when i create new vm
1654752596915.png
bridge cann't to select, no data in it

lspci
29:00.0 Network controller: Intel Corporation Device 2725 (rev 1a) <--- wifi port intel ax210
2a:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
root@pve:~# lspci -nnk |grep -i net
29:00.0 Network controller [0280]: Intel Corporation Device [8086:2725] (rev 1a)
2a:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller [10ec:8125] (rev 05)

if i want used enp42s0 , need add rtl8125 to nic_model_list. ???
if i want used enp41s0, need add 2725 to nic_model_list ???


it my first time to use pve, can anyone help me??? and sorry, my english is not good
 
I think you have to create a vm bridge under System -> Network (on the host) with the bridge ports "wlp41s0" than it should work.
is means config below:

iface wlp41s0 inet manual
auto vmbr1
iface vmbr1 inet static
address xxxx/xx
gateway xxxx
wpa-conf /etc/wpa.conf

then bridge vport to vmbr1 when create vm ???
 
Last edited:
I would try to leave wlp41s0 as it is. And would create an empty bridge.

Code:
auto vmbr1
iface vmbr1 inet manual
    bridge-ports wlp41s0
    bridge-stp off
    bridge-fd 0

Than you can add "vmbr1" as bridge in your VM.
 
I would try to leave wlp41s0 as it is. And would create an empty bridge.

Code:
auto vmbr1
iface vmbr1 inet manual
    bridge-ports wlp41s0
    bridge-stp off
    bridge-fd 0

Than you can add "vmbr1" as bridge in your VM.
vm1 bridge to wlp41s0, but can't used to vm
 
Hi everybody,

I´ve just started some weeeks ago with Proxmox. Amazing tool indeed! The thing is that I´ve been reading and reading all through these forums anda sometimes I figured out that it was possible to bridge a Wifi connection to the the VMs but, other times not.

I have bridged Vmbr1 to the ip range of my wireless adapter a configured it as you said but, when I started the VM (a Linux one) it says that "wire connection error".

Furthermore, I belive that most wifi chipsets don´t support "bridging" feature. I´m not sure of that...
Hasn´t anybody in these amazing forum done it? I´m sure that yes.
There should be a way to do it... perhaps not bridging directly but through other methods.
My purpose is just for labs. Nothing proffesional,

Thankss!!
 
The thing is that I´ve been reading and reading all through these forums anda sometimes I figured out that it was possible to bridge a Wifi connection to the the VMs but, other times not.
It is usually not possible to bridge a Wifi interface (or at least not in a way that VMs/LXCs could access the internet) becasue the Wifi AP will drop the packets of bridged virtual NICs. You have to NAT between a bridge and a wifi interface so the Wifi AP is always seeing the single MAC of the Wifi interface and not the MACs of the virtual NICs of the VMs/LXCs. Basically turning your PVE host into a router.

See the Wiki why not to use Wifi and how to work around the bridging problem: https://pve.proxmox.com/wiki/WLAN
 
Last edited:
  • Like
Reactions: eskamon
It is usually not possible to bridge a Wifi interface (or at least not in a way that VMs/LXCs could access the internet) becasue the Wifi AP will drop the packets of bridged virtual NICs. You have to NAT between a bridge and a wifi interface so the Wifi AP is always seeing the single MAC of the Wifi interface and not the MACs of the virtual NICs of the VMs/LXCs. Basically turning your PVE host into a router.

See the Wiki why not to use Wifi and how to work around the bridging problem: https://pve.proxmox.com/wiki/WLAN
Thanks for your reply!
I´ve been struggling whith the info of that link about "NATing" bridge and Wifi AP but with no result. My VM is a Linux Mint and always show as "without connection". I have adapted the commands to my IPs and MAC from my bridge and VM but... nothing happends. My Proxmox has internet connection but the VM not. There is somthing taht I´m doing wrong... Help me please
 
Would be useful if you could show your network config. Should be similar to this: https://pve.proxmox.com/wiki/Network_Configuration#sysadmin_network_masquerading
Ok! Let´s go with it:

Code:
auto lo
iface lo inet loopback

auto wlp3s0b1
iface wlp3s0b1 inet dhcp
        wpa-essid "EarthQuake"
        wpa-psk "xxx"

#iface enp2s0f0 inet manual

auto vmbr1
iface vmbr1 inet manual
        bridge-ports none
        bridge-stp off
        bridge-fd 0
        pre-up iwconfig wlp3s0b1 essid "EarthQuake"
        bridge_hw b8:76:3f:2c:9d:a4

source /etc/network/interfaces.d/*

The thing is that, following the link you share two replies ago, I use ebtables instead of iptables.

https://wiki.debian.org/BridgeNetworkConnections#Bridging_with_a_wireless_NIC

On Linux Mint VM, same interfaces file:

Code:
auto ens18
iface ens18 inet static
    address 192.168.0.100/24
    gateway 192.168.0.1
    dns-nameserver 8.8.8.8
source /etc/network/interfaces.d/*

ebtables -t nat -L

Code:
root@vulkano:~# ebtables -t nat -L
Bridge table: nat

Bridge chain: PREROUTING, entries: 2, policy: ACCEPT
-p IPv4 -i wlp3s0b1 --ip-dst 192.168.0.100 -j dnat --to-dst bc:24:11:bc:90:7c --dnat-target ACCEPT
-p ARP -i wlp3s0b1 --arp-ip-dst 192.168.0.100 -j dnat --to-dst bc:24:11:bc:90:7c --dnat-target ACCEPT

Bridge chain: OUTPUT, entries: 0, policy: ACCEPT

Bridge chain: POSTROUTING, entries: 1, policy: ACCEPT
-o wlp3s0b1 -j snat --to-src 06:36:aa:cb:54:b4 --snat-arp --snat-target ACCEPT

Something else??
Should I do with iptables?

Thanks @Dunuin
 
Would be useful if you could show your network config. Should be similar to this: https://pve.proxmox.com/wiki/Network_Configuration#sysadmin_network_masquerading
I have changed everything. Deleted all related to ebtables and reconfigured as the example of your link. Now, my network config is like this:

Code:
auto lo
iface lo inet loopback

auto wlp3s0b1
iface wlp3s0b1 inet dhcp
        wpa-essid "EarthQuake"
        wpa-psk "01032016SuperJon"

#iface enp2s0f0 inet manual

auto vmbr1
iface vmbr1 inet static
        address 10.10.10.1/24
        bridge-ports none
        bridge-stp off
        bridge-fd 0
        pre-up iwconfig wlp3s0b1 essid "EarthQuake"
        bridge_hw b8:76:3f:2c:9d:a4
        post-up echo 1 > /proc/sys/net/ipv4/ip_forward
        post-up iptables -t nat -A POSTROUTING -s 10.10.10.0/24 -o wlp3s0b1 -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s 10.10.10.0/24 -o wlp3s0b1 -j MASQUERADE
#       post-up   iptables -t raw -I PREROUTING -i fwbr+ -j CT --zone 1
#       post-down iptables -t raw -D PREROUTING -i fwbr+ -j CT --zone 1
source /etc/network/interfaces.d/*
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!