change from lan to wifi not work

Foulek57

Member
Mar 14, 2020
8
0
6
31
Hello !

First of all, i'm french so sorry for my bad english...

I try to configure by mini PC to use wifi.

I very beginger in the Networking configuration...

Actually, it is connecter by LAN with this configuration in /etc/network/interfaces :

Code:
auto lo
iface lo inet loopback

iface enp1s0 inet manual

auto vmbr0
iface vmbr0 inet static
        address 192.168.31.140
        netmask 255.255.255.0
        gateway 192.168.31.1
        bridge_ports enp1s0
        bridge_stp off
        bridge_fd 0

iface enp2s0 inet manual

iface enp3s0 inet manual

iface enp4s0 inet manual

iface wlp5s0 inet manual

The Wifi are wlp5s0

So i have change the file to :

Code:
auto lo
iface lo inet loopback

iface enp1s0 inet manual

auto vmbr0
iface vmbr0 inet static
        address 192.168.31.140
        netmask 255.255.255.0
        gateway 192.168.31.1
        bridge_ports wlp5s0
        bridge_stp off
        bridge_fd 0ç

iface enp2s0 inet manual

iface enp3s0 inet manual

iface enp4s0 inet manual

auto wlp5s0
 iface wlp5s0 inet dhcp
           wpa-ssid Xiaomi_65F6
           wpa-psk 2019xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx062575ca7e490

After this change, i reboot and disconnecting the LAN cable
But this do not working.

Have miss one step ?

Hope you can help me.

Thanks.
Nicolas.
 
It is not the router(internet box) that give the IP ? Sorry i'm very begginger in this :(

You will say that on the linux who are proxmox they are also a DHCP server ?

If you how can i find it, i have no dhcp in /etc/

I see the 2 IP in my router connected to wifi

1584208149409.png
 
on your proxmox you wish to connect to wifi, something like this

auto lo
iface lo inet loopback

iface enp1s0 inet manual

auto vmbr0
iface vmbr0 inet static
address 192.168.31.140
netmask 255.255.255.0
gateway 192.168.31.1
bridge_ports enp1s0
bridge_stp off
bridge_fd 0
 
and do the same for you wifi port with ip address 192.168.31.141 if it is free!

at this time you are not sure
is your router not geting a request?
is your router sending a response to wrong place
is your wifi not working on your proxmox?

you are just sure lan is working!
 
Hello,

I have some news now i am connected to wifi.
But if i are with wifi or LAN, i can no more creat a new VM because the bridge are not detected on the configuration.

On the other VM that i have alreay it is ok, and networking work on it !!

But the brige is empty :

vmbr0.png

Ifi try to modify a VM that have the bridge, it is the same (but the name of the bridge apear :

Screenshot_3.png

Here my /etc/network/interfaces file :

Code:
auto lo
iface lo inet loopback

iface enp1s0 inet manual

auto wlp5s0
iface wlp5s0 inet dhcp
        wpa-ssid "Xiaomi_65F6"
        wpa-psk 20xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx90

auto vmbr0
iface vmbr0 inet static
        address 192.168.31.140
        netmask 255.255.255.0
        gateway 192.168.31.1
        bridge_ports enp1s0
        bridge_stp off
        bridge_fd 0

iface enp2s0 inet manual

iface enp3s0 inet manual

iface enp4s0 inet manual

s0 inet manual

LAN and WIFI are connected

It is the same if only the LAN are connected.

I think that i have change one think but i have do a lot of change and do no know when the bridge have faded away.

Hope you can help me to solve this problem, to retry to configure the bridge with wifi.
 
Hello,

You can't bridge with WiFi. I learned this the hard way. Try using NAT and masquerade to the bridge. It should work.
 
Hello,

You can't bridge with WiFi. I learned this the hard way. Try using NAT and masquerade to the bridge. It should work.
Thanks for the answer.
I am really newbie with Linux network can you explain how to do this ? Or do you have a how to ?
 
Copy these lines and add them:

post-up iptables -t nat -A POSTROUTING -s '192.168.1.0/24' -o vmbr1 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.1.0/24' -o vmbr1 -j MASQUERADE

Replace 192.168.1.0 with your ip subnet, replace vmbr1 with your bridge interface. Save and reboot.
 

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!