[TUTORIAL] How to set up Proxmox VE 7 on a laptop (workstation) with wifi (wlan)

Feb 1, 2021
1
0
1
51
Tested on a Lenovo Thinkpad P1 gen2 with the Proxmox 7.1-2 iso.
An ethernet connection to internet is required during the installation process (because iwd is not installed by default).

1. Plug the ethernet cable

2. Install Proxmox

3. Reboot and login with root

4. Update the Proxmox repository

Disable the enterprise repository
vi /etc/apt/sources.list.d/pve-enterprise.list
by commenting the line
#deb https://enterprise.proxmox.com/debian/pve bullseye pve-enterprise
and enable the "no-subscription" repository by creating a new file
vi /etc/apt/sources.list.d/pve-no-subscription.list
with
deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription

5. Update the System
apt update && apt dist-upgrade

6. Install the Desktop Environment (or Windows Manager)
apt install -y task-kde-desktop (or task-xfce-desktop, task-gnome-desktop, i3, sway...)

7. Create a bridge for your VM and CT
The network address (10.0.0.1/16 here) must be different from the network address of your internet box.
Don't add anything to this file if you only use a wifi connection.
vi /etc/network/interfaces
Code:
auto lo
iface lo inet loopback

auto vmbr0
iface vmbr0 inet static
     address 10.0.0.1/16
     bridge-ports none
     bridge-stp off
     bridge-fd 0

8. Configure Nftables for NAT
echo net.ipv4.ip_forward=1 > /etc/sysctl.d/routing.conf sysctl -p --system systemctl enable nftables.service vi /etc/nftables.conf
Code:
#!/usr/sbin/nft -f
flush ruleset
table ip nat {
        chain postrouting {
                type nat hook postrouting priority 0; policy accept; masquerade
        }
}
systemctl start nftables.service

9. Configure iwd (optional)
Iwd (iNet wireless daemon) is required only if you don't want to use the wifi manager provided by your DE, or if you installed a WM.
Iwd is much easier to configure and use than wpa_supplicant.
apt install -y iwd systemctl --now enable iwd (don't mind the messages)
vi /etc/iwd/main.conf
Code:
[General]
EnableNetworkConfiguration=true
service iwd restart

10. Create your user
adduser [user]

11. Reboot and unplug the ethernet cable

12. Login with your user

13. Connect to the wifi network

Use your DE wifi manager.
Or iwd with iwctl (if installed and configured previously):
ip a (check the wlan interface name ; "wlan0" here)
iwctl station [wlan0] scan && iwctl station [wlan0] get-networks iwctl station [wlan0] connect [SSID]

14. Create a VM or CT and configure the network
Login to PVE at https://127.0.0.1:8006
Create a VM or CT and configure the IP address with 10.0.0.[100]/16 and gateway 10.0.0.1
 

apriestley

New Member
Jan 14, 2022
2
0
1
32
Hey there, great guide. Really helped me out!

I'm attempting to achieve this setup and so far I've had partial success...
I can pass internet to a CT, but not to a VM. VM can ping host, as well as other resources (and vice-versa), but it can't get outside. Again, CT can get outside.

ip a on..

host:
Code:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp60s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 10:65:30:f7:02:f2 brd ff:ff:ff:ff:ff:ff
4: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 9c:b6:d0:6b:44:a7 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.109/24 scope global wlan0
       valid_lft forever preferred_lft forever
    inet6 fe80::9eb6:d0ff:fe6b:44a7/64 scope link
       valid_lft forever preferred_lft forever
5: vmbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 7a:7b:e7:78:c8:e3 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.1/16 scope global vmbr0
       valid_lft forever preferred_lft forever
    inet6 fe80::787b:e7ff:fe78:c8e3/64 scope link
       valid_lft forever preferred_lft forever
6: tap101i0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master vmbr0 state UNKNOWN group default qlen 1000
    link/ether da:a7:8c:75:df:c7 brd ff:ff:ff:ff:ff:ff
7: veth100i0@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master fwbr100i0 state UP group default qlen 1000
    link/ether fe:40:41:cd:77:28 brd ff:ff:ff:ff:ff:ff link-netnsid 0
8: fwbr100i0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 22:7e:13:c5:be:c8 brd ff:ff:ff:ff:ff:ff
9: fwpr100p0@fwln100i0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master vmbr0 state UP group default qlen 1000
    link/ether 4a:44:2c:c3:f6:e5 brd ff:ff:ff:ff:ff:ff
10: fwln100i0@fwpr100p0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master fwbr100i0 state UP group default qlen 1000
    link/ether 9e:31:50:c5:f9:0a brd ff:ff:ff:ff:ff:ff

CT:
Code:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0@if7: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether da:4d:9c:e7:9c:76 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.7/16 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::d84d:9cff:fee7:9c76/64 scope link
       valid_lft forever preferred_lft forever

VM:
Code:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 7e:99:94:3e:6d:3e brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.3/16 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::7c99:94ff:fe3e:6d3e/64 scope link
       valid_lft forever preferred_lft forever

How do you get your VMs online?

Cheers!
 

apriestley

New Member
Jan 14, 2022
2
0
1
32
Hey there, great guide. Really helped me out!

I'm attempting to achieve this setup and so far I've had partial success...
I can pass internet to a CT, but not to a VM. VM can ping host, as well as other resources (and vice-versa), but it can't get outside. Again, CT can get outside.

ip a on..

host:
Code:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp60s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 10:65:30:f7:02:f2 brd ff:ff:ff:ff:ff:ff
4: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 9c:b6:d0:6b:44:a7 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.109/24 scope global wlan0
       valid_lft forever preferred_lft forever
    inet6 fe80::9eb6:d0ff:fe6b:44a7/64 scope link
       valid_lft forever preferred_lft forever
5: vmbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 7a:7b:e7:78:c8:e3 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.1/16 scope global vmbr0
       valid_lft forever preferred_lft forever
    inet6 fe80::787b:e7ff:fe78:c8e3/64 scope link
       valid_lft forever preferred_lft forever
6: tap101i0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master vmbr0 state UNKNOWN group default qlen 1000
    link/ether da:a7:8c:75:df:c7 brd ff:ff:ff:ff:ff:ff
7: veth100i0@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master fwbr100i0 state UP group default qlen 1000
    link/ether fe:40:41:cd:77:28 brd ff:ff:ff:ff:ff:ff link-netnsid 0
8: fwbr100i0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 22:7e:13:c5:be:c8 brd ff:ff:ff:ff:ff:ff
9: fwpr100p0@fwln100i0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master vmbr0 state UP group default qlen 1000
    link/ether 4a:44:2c:c3:f6:e5 brd ff:ff:ff:ff:ff:ff
10: fwln100i0@fwpr100p0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master fwbr100i0 state UP group default qlen 1000
    link/ether 9e:31:50:c5:f9:0a brd ff:ff:ff:ff:ff:ff

CT:
Code:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0@if7: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether da:4d:9c:e7:9c:76 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.7/16 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::d84d:9cff:fee7:9c76/64 scope link
       valid_lft forever preferred_lft forever

VM:
Code:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 7e:99:94:3e:6d:3e brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.3/16 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::7c99:94ff:fe3e:6d3e/64 scope link
       valid_lft forever preferred_lft forever

How do you get your VMs online?

Cheers!
Silly oversight. Turns out I COULD ping out if I used a public IP. The answer was that I did not set my DNS inside the VM (I actually thought that it would fallback to the host DNS if not set).
 

yannice92

New Member
Jun 12, 2022
1
0
1
Silly oversight. Turns out I COULD ping out if I used a public IP. The answer was that I did not set my DNS inside the VM (I actually thought that it would fallback to the host DNS if not set).
Hi, I was set dns on nameserver 8.8.8.8 but still cannot connect to the internet. could you share ur config ? thanks
 

skyluker

New Member
Aug 21, 2022
1
0
1
I followed the tutorial and now the proxmox has the Internet access, but VM doesn't.

In the node System/Network i see 2 positions: eno1 - Network Device not active; and vmbr0 - Linux Bridge - CIDR 10.0.0.1/16

When I installed Ubuntu i doesnt get the proper IP address.

Anyone could help how to configure it?

Best!
 

Attachments

  • network1.png
    network1.png
    66.1 KB · Views: 24
  • ubuntu1.png
    ubuntu1.png
    120 KB · Views: 23
  • ubuntu2.png
    ubuntu2.png
    78.5 KB · Views: 23
  • ubuntu2ipa.png
    ubuntu2ipa.png
    165.5 KB · Views: 21

uav2608

New Member
Aug 27, 2022
1
0
1
I followed the tutorial and now the proxmox has the Internet access, but VM doesn't.

In the node System/Network i see 2 positions: eno1 - Network Device not active; and vmbr0 - Linux Bridge - CIDR 10.0.0.1/16

When I installed Ubuntu i doesnt get the proper IP address.

Anyone could help how to configure it?

Best!
it looks you VMs were not property configured for static ip. Please check the below links (I did not check them but found relevant to your version of Ubuntu or google for other resources how to configure static ip for Ubuntu 22.04)
https://tecadmin.net/how-to-configure-static-ip-address-on-ubuntu-22-04/
https://linuxhint.com/setup_static_ip_address_ubuntu/
 

jordan87

New Member
Aug 28, 2022
1
0
1
Hi

I have a problem with last part.
I have VM with Home Assistant and i dont have access to it from browser.
Where this part should be configured, in Proxmox somewhere or directly in VM (in my case HAOS)?
"Create a VM or CT and configure the IP address with 10.0.0.[100]/16 and gateway 10.0.0.1"
 

ILove47

New Member
Nov 6, 2022
2
0
1
Hi!
Got an issue. Cannot access the internet from the VM. Also cannot access pve host from the VM and vice versa.
I cannot ping the internet from the host. (ping google.com)
Only can ping it when specifying the interface. (ping -I wlan0 google.com)

During my installation steps, I skipped step 6. (I'm just connecting to the laptop through the web interface, so I decided that I don't need any desktop environment).
Also, in step 9 I installed iwd and in step 13 I used it to connect to the wifi.

I want my existing home LAN, host, and VMs to be in the same network (192.168.0.xxx/24).
My home router is at 192.168.0.1.
Proxmox laptop is expected to be at 192.168.0.5.
And VM (ubuntu server 22.04) at 192.168.0.200.

Here are the /etc/network/interface from pve-host:
Code:
auto lo
iface lo inet loopback

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

And /etc/netplan/00-installer-config.yaml from ubuntu-server:
Code:
network:
  ethernets:
    ens18:
      dhcp4: false
      addresses: [192.168.0.200/24]
      routes:
        - to: default
          via: 192.168.0.5 #(I tried setting up gateway to both 192.168.0.1 (router) and 192.168.0.5 (pve host))
  version: 2


Also attaching the ip a && ip r results for proxmox host:

Code:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp7s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether b8:70:f4:13:xx:xx brd ff:ff:ff:ff:ff:ff
4: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether c0:f8:da:62:xx:xx brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.5/24 brd 192.168.0.255 scope global noprefixroute wlan0
       valid_lft forever preferred_lft forever
5: vmbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 6a:7c:ec:b2:xx:xx brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.5/24 scope global vmbr0
       valid_lft forever preferred_lft forever
    inet6 fe80::687c:ecff:xxxx:xxxx/64 scope link
       valid_lft forever preferred_lft forever
6: tap100i0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master fwbr100i0 state UNKNOWN group default qlen 1000
    link/ether f2:11:73:68:xx:xx brd ff:ff:ff:ff:ff:ff
7: fwbr100i0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 56:96:b9:bb:xx:xx brd ff:ff:ff:ff:ff:ff
8: fwpr100p0@fwln100i0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master vmbr0 state UP group default qlen 1000
    link/ether 46:e6:7e:c7:ba:8e brd ff:ff:ff:ff:ff:ff
9: fwln100i0@fwpr100p0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master fwbr100i0 state UP group default qlen 1000
    link/ether 32:b3:ec:2c:54:4c brd ff:ff:ff:ff:ff:ff


default via 192.168.0.1 dev vmbr0 proto kernel onlink
default via 192.168.0.1 dev wlan0 proto dhcp metric 304
192.168.0.0/24 dev wlan0 proto dhcp scope link src 192.168.0.5

And for ubuntu server:
Code:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: ens18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 82:f0:2f:e7:xx:xx brd ff:ff:ff:ff:ff:ff
    altname enp0s18
    inet 192.168.0.200/24 brd 192.168.0.255 scope global ens18
       valid_lft forever preferred_lft forever
    inet6 fe80::80f0:2fff:xxxx:xxxx/64 scope link
       valid_lft forever preferred_lft forever

default via 192.168.0.5 dev ens18 proto static  #(I tried setting up gateway to both 192.168.0.1 (router) and 192.168.0.5 (pve host))
192.168.0.0/24 dev ens18 proto kernel scope link src 192.168.0.200


Thanks for any suggestions in advance!
 

ILove47

New Member
Nov 6, 2022
2
0
1
I thought about that as well. :)
But i had few thoughts:
* I thought that step 8 is doing something smart about NAT already. :)
* Why should somebody post this tutorial if it's working only for proxmox and doesn't work for the VMs inside?

But thanks, I'll look at those pages again. :)
Just hoped this topic's solution will have some 'magic' inside. :)
 

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 your own in 60 seconds.

Buy now!