IP routing from wireless to virtual interface

Nabsta333

Member
Oct 15, 2020
3
0
6
25
Hello. I was hoping I could get some insight as to why I'm not able to access the internet from my vms. Looking through various threads I've learnt that most wireless cards dont support bridging so I tried to use routing through IP tables as indicated here. I'm still having no luck however. I've even made sure that I've configured the network on the vm to use a static IP.

Here is my /etc/network/interfaces

Code:
auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet dhcp
        wpa-ssid SSID
        wpa-psk psswd

iface eth0 inet manual

auto vmbr0
iface vmbr0 inet static
        address 10.10.10.0
        #gateway 192.168.33.1
        netmask 255.255.255.0
        bridge-ports none
        bridge-stp off
        bridge-fd 0

        post-up   echo 1 > /proc/sys/net/ipv4/ip_forward
        post-up   iptables -t nat -A POSTROUTING -s '10.10.10.0/24' -o wlan0 -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o wlan0 -j MASQUERADE

I've tried alot of things, even renaming my wireless interface to eth1 so proxmox will think its an ethernet network device, however the vmbr0 never stays 'active'. Any other suggestions would be greatly appreciated.

These are my network devices.

Code:
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller (rev 07)
02:00.0 Network controller: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter (rev 01)
 
Hi,

I guess the problem here is that the wlan0 dev is not up and configured when the vmbr0 comes up.
Try to add this line to wlan0
Code:
post-up sleep 10
 

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!