[CentOS-virt] OT: adding a wifi adapter to openvswitch

Thu Sep 24 10:59:47 UTC 2015
Dmitry E. Mikhailov <d.mikhailov at infocommunications.ru>

On 09/24/2015 03:21 PM, C. L. Martinez wrote:
> Thanks Dimitry, but I use wlan0 or eth0 to connect my laptop to
> different networks. I use a vm as fw and I would like to have all vms
> and laptop behind this fw vm guest.
> Another option is to assign an IP to these interfaces and natting all
> to this fw vm ... but I don't like this option

It isn't going to be safe, simple and reliable. You won't have anything 
like 'NetworkManager' on the laptop host OS. It either should be heavily 
scripted or not done at all.

You could write some fancy ebtables rules to do one-to-one MAC mapping 
between the fw VM interface and host interface and run DHCP client on 
the fw VM.

On the host you'd have static route to another fw VM interface.

But I can't imagine all the hotplug event scripting. How could fw VM 
find out if it's time to (re-)run DHCP client? How would you configure 
WPA keys on the host. How would find out if WiFi is disconnected, cable 
is connected and it's time to redo MAC mapping with another MAC address?

Without some real effort it's going to be fully(partly?) manual config 
with wpa_supplicant, ebtables and ssh'ing to fw VM involved. I doubt I 
would like to change from NetworkManager to this stuff instead.

That's why they do https://www.anonabox.com/
Otherwise you can get some OpenWRT on a commodity router to run some VPN 
or T#r or some other funny stuff