[SOLVED] WIFI dongle setup

Kubro

New Member
Mar 12, 2024
4
0
1
Hi! First of all, I'm new to all this. Now, I want to setup Proxmox VE via a WIFI USB dongle (I know it's not recommended).

I have managed to set up my Proxmox and my WIFI dongle. (Took me a while and lots of trial and error.) I can now access the Proxmox UI via another laptop on the same network and I can ping google.com from the Proxmox terminal.

However, I wanted to set up a VM, but I can't seem to pass the connection to it. I tried a Home Assistant VM and a Debian one, but both could not connect to the internet or ping other VMs/the host (Network is unreachable and Destination Host Unreachable).

I tried many things (not sure if I did them all right), but nothing seems to work. Can anyone help me out?

This is my /etc/network/interfaces:
Code:
auto lo
iface lo inet loopback

iface enp1s0 inet manual

auto wlx1cbfce1dbf8f
iface wlx1cbfce1dbf8f inet static
        wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
        address 192.168.0.10/24
        gateway 192.168.0.1
        wpa-essid my_ssid
        wpa-psk my_psk

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

        post-up   echo 1 > /proc/sys/net/ipv4/ip_forward
        post-up   iptables -t nat -A POSTROUTING -s '192.168.137.0/24' -o wlx1cbfce1dbf8f -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s '192.168.137.0/24' -o wlx1cbfce1dbf8f -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/*
 
Yes, I think so.

ip route on my Debian VM gives me:
Code:
default via 192.168.137.1 dev ens18 onlink
192.168.137.0/24 dev ens18 proto kernel scope link src 192.168.137.12

ip route on my Home Assistant VM gives me:
Code:
172.30.32.0/23 dev hassio proto kernel scope link src 172.30.32.1
172.30.232.0/23 dev docker0 proto kernel scope link src 172.30.232.1

In the Hardware tab in Proxmox, I can see vmbr0 selected on both VMs.
 
The gateway is incorrectly set on Debian VM.

Your setting is 192.168.137.1 and it should be 192.168.137.10.

Home Assistant VM should be on the 192.168.137.0/24 network.
 
  • Like
Reactions: Kubro
Oh! Yes, that was it, thank you! I've changed them like this:

Debian:
Code:
default via 192.168.137.10 dev ens18 onlink
192.168.137.0/24 dev ens18 proto kernel scope link src 192.168.137.12

Home Assistant:
Code:
default via 192.168.137.10 dev enp0s18 proto static metric 100
172.30.32.0/23 dev hassio proto kernel scope link src 172.30.32.1
172.30.232.0/23 dev docker0 proto kernel scope link src 172.30.232.1
192.168.137.0/24 dev enp0s18 proto kernel scope link src 192.168.137.11 metric 100

Now I can ping google.com from both the VMs!

However, I can not access the Home Assistant UI. When going to 192.168.137.11:8123 or homeassistant.local:8123 it times out. (I have set Home Assistants address to 192.168.137.11/24 and it is shown on the welcome screen)
 
If the laptop from which you connect to PVE has Windows,
you should add a route to the vmbr0 192.168.137.0/24 network via PVE 192.168.0.10
by issuing the command in cmd with Administrator privileges elevated:

route -p add 192.168.137.0 mask 255.255.255.0 192.168.0.10

the -p switch will save the route permanently and will be available after restarting the laptop.

Please take a look at

https://forum.proxmox.com/threads/setup-proxmox-network-with-wifi-interface-and-vpn.143145/
 
Last edited:
  • Like
Reactions: Kubro
I did not know that, thank you!

Everything seems to work now. Thank you so much for helping me out!
 

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!