Help needed - PVE with WIFI Stick installation

final

New Member
Jun 8, 2023
21
1
3
Hi everyone.
I need help setting up my network on Proxmox...

Here is my situation:
I have installed proxmox on a HP T620 over LAN, which was surprisingly easy. I can access via Webinterface or SSH.
The HP is supposed to replace my old RPi 2B running iobroker, which is monitoring my power usage (via USB optical reader) as well a monitoring my solar panel (via WIFI Shelly 1PM).
Because this happens in the basement, I have to use WIFI to connect to my Fritz Box und the Shelly. I have absolutely no way to get LAN down there. :(

My question:
1) How can I connect proxmox via WIFI to my Fritzbox?
2) How can i connect the Debian VM running iobroker via WIFI with my Shelly and the Fritzbox?

I have 2 USB WLAN sticks available to use (1 Fritz WLAN Stick AC860 and 1 Edimax EW-7811 USB WLAN Stick).
Can I use one for proxmox and one for VM passthrough? If yes, how?

Thanks for your help!
 
Because this happens in the basement, I have to use WIFI to connect to my Fritz Box und the Shelly. I have absolutely no way to get LAN down there.
Maybe Powerline is an option where you send your data over the power grid.

1) How can I connect proxmox via WIFI to my Fritzbox?
See how to use the wpa_supplicant.conf: https://wiki.debian.org/WiFi/HowToUse#wpa_supplicant

2) How can i connect the Debian VM running iobroker via WIFI with my Shelly and the Fritzbox?
You can't bridge a Wifi interface. So you will have to set up your PVE host as a router doing NAT or otherwise no VM will be able to communicate with the outside world:
See here: https://pve.proxmox.com/wiki/WLAN

I have 2 USB WLAN sticks available to use (1 Fritz WLAN Stick AC860 and 1 Edimax EW-7811 USB WLAN Stick).
Can I use one for proxmox and one for VM passthrough? If yes, how?
That might work. Just test it if USB passthrough works.
 
Last edited:
Hey, that was quick.

So, I had once used powerline to get to the upstairs rooms, but it did not work well (old house). I COULD try, but would like to avoid it.

I had a look at these links some time ago, but it did not help me. Some commands seem not even to work.

Maybe as a first step I should try to get proxmox running with WIFI.
With lsusb I can see the Fritz WLAN Stick. Should I try to configure WIFI with the webinterface?
 
Proxmox doesn't suport wifi, so you would need to configure it using the CLI editing the /etc/network/interfaces, creating your wpa_supplicant.conf, enable packet forwarding, set up iptables rules for NAT and so on. It's not different to any other Debian without a desktop environment.
 
Last edited:
sounds easy enough o_O
could you guide me?
should I give some system information or the content of /etc/network/interfaces as a start?
 
Just went through this and documented for myself to replicate.
Here's the process/example I use for wireless proxmox host. Change interface names, SSID, password, and IPs accordingly.

1) In your router's advanced settings, you'll want to set a static route. For below example it's CIDR 192.168.3.0/24 for gateway 192.168.68.3

2) Set up Wifi on OS and have it start on boot.

Code:
apt install wpasupplicant
systemctl disable wpa_supplicant
wpa_passphrase SSIDNAME PASSWORD >> /etc/wpa_supplicant/wpa_supplicant.conf

cat >> /etc/systemd/system/wpa_supplicant.service << EOF
[Unit]
Description=WPA supplicant
Before=network.target
After=dbus.service
Wants=network.target
IgnoreOnIsolate=true

[Service]
Type=dbus
BusName=fi.w1.wpa_supplicant1
ExecStart=/sbin/wpa_supplicant -u -s -c /etc/wpa_supplicant/wpa_supplicant.conf -i wlp1s0
Restart=always

[Install]
WantedBy=multi-user.target
Alias=dbus-fi.w1.wpa_supplicant1.service
EOF

systemctl enable wpa_supplicant



3) Set up interfaces file with a router IP (make sure youre plugged into monitor or youre really confident before you reboot)

Code:
auto lo
iface lo inet loopback

auto enp2s0
iface enp2s0 inet manual

auto wlp1s0
iface wlp1s0 inet manual
        address 192.168.68.3/24
        gateway 192.168.68.1

auto vmbr0
iface vmbr0 inet static
        address 192.168.3.1/24
        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 '192.168.3.0/24' -o wlp1s0 -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s '192.168.3.0/24' -o wlp1s0 -j MASQUERADE

4) Create VMs containers on vmbr0 with 192.168.3.1 gateway.

(reference) https://pve.proxmox.com/wiki/Networ...ith_tt_span_class_monospaced_iptables_span_tt
 
Last edited:
  • Like
Reactions: Dunuin
@nca
Cool, thanks. I just saw your post, did play around yesterday a bit more (can post code and screenshots later):
- managed to install wpa_supplicant, create the config file with my network SSID and passphrase
- attempted to connect to the network via
Code:
wpa_supplicant -i INTERFACE -c /etc/wpa_supplicant/wpa_supplicant.conf
which kind of seemed to work but it took some time and did not finish as far as I can say
- have not modified the /interfaces file so far

Questions:
- you're using systemd. Why, what for? Would I need this? I am quite a linux noob - what does the first code do?
- static IP: at the moment there is a static IP set for the LAN connection (at the router and in the /interfaces file). I would do the same for the WLAN stick (but it would of course be a different IP?!)


Let me know what code and stuff I should post here to answer my questions.
 

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!