WLAN with NAT workaround not working

AveragePVE-User

New Member
Sep 20, 2024
1
0
1
Hello,
First of all I like to mention that I'm aware of the risks and disadvantages of using WLAN under Proxmox, yet I want to do this, because I have build my own Firewall with Pfsense in another VM and I'd like to also embed the WLAN traffic of my local network into it, which is why I need the WLAN traffic to be routed through a Linux Bridge (aside from that, if im being totally honest, my internet is already so slow that It cannot become any worse in a way where I'd feel a major difference compared to surfing with the crappy router my ISP gave me :p ). My motherboard already comes with a "Intel Corporation Dual Band Wireless-AC 3168NGW [Stone Peak] (rev 10)" so I thought I might be able to pull this off like "Alexander Fershtein" did with the help of that article I also found. The Intel Wi-Fi chip under the name wlan0 is according to "ip link show" and "iwq via iwctl" (the wifi driver) up and running with an own address.

The problem is that the workaround by using NAT to bridge WLAN is not really working for me. This is the furthest I've come:

Code:
ifreload -a
warning: vmbr2: apply bridge ports settings: cmd '/bin/ip -force -batch - [link set dev wlan0 master vmbr2]' failed: returned 1 (Error: Device does not allow enslaving to a bridge.
Command failed -:1
)

My configuration:

Code:
#Network Devices:

auto wlan0
iface wlan0 inet manual

auto enp3s0
iface enp3s0 inet manual

auto enx0c379686bda1
iface enx0c379686bda1 inet manual

#NAT-Workaround

post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '10.10.10.0/24' -o enp3s0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o enp3s0 -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

#Linux-Bridges:

auto vmbr2
iface vmbr2 inet manual
        address 10.10.10.1/24
        bridge-ports wlan0
        bridge-stp off
        bridge-fd 0
        bridge-std off

#WAN
auto vmbr0
iface vmbr0 inet static
        address 192.168.2.10/24
        gateway 192.168.2.1
        bridge-ports enp3s0
        bridge-stp off
        bridge-fd 0

#LAN
auto vmbr1
iface vmbr1 inet manual
        bridge-ports enx0c379686bda1
        bridge-stp off
        bridge-fd 0

source /etc/network/interfaces.d/*

Please help me, at this point I can do nothing more than just testing out other ways without really knowing what I'm exactly doing.





Note: I'm starting to confuse myself really hard right now for things that I generally should know how it works... I'm essentially asking myself why I'm even routing WLAN directly to the WAN instead of the LAN side? WAN is outside of the firewall so it wouldn't make sense to route WLAN signals through WAN if I want the guard of my pfsense, right? I might also don't really understand how Linux Bridges exactly work: Assigning wlan0 to the LAN-linux bridge doesn't really have to make it transfer the data through LAN, but will direct them to WAN i hope?????

Second note: Even though the error does not warn about me "reusing" an already existing and used linux bridge (meaning enp3s0), it may or may not be part of the issue... Im doing further research.
 
Last edited:

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!