QEMU
Bridge Network:
lots of resources on bridging phy adapters to get VM on the LAN:
http://www.linux-kvm.org/page/Networking
However,
Can't bridge wireless cards....
Haven't tried this yet: http://specman1.wordpress.com/2014/01/02/wireless-bridging-virtual-machines-kvm/
this is a mix of two methods. 1st define a new network (IP schema a subnet of the LAN) for kvm-qemu. Then use kvm-qemu routing...however, on the real LAN run proxy-arp (the host machine) for one VM. Thus, host replies for the VM ip address and then fwds it to the VM.
Thus, using the proxy arp method set- by step: http://blog.bodhizazen.net/linux/bridge-wireless-cards/
Installed tunctl in fedora
checked the security step ...
[root@shoonya ~]$ ll /dev/net* -d
drwxr-xr-x. 2 root root 60 Apr 20 10:31 /dev/net/
crw-------. 1 root root 10, 61 Apr 20 10:31 /dev/network_latency
crw-------. 1 root root 10, 60 Apr 20 10:31 /dev/network_throughput
[root@shoonya ~]$ ll /dev/net/
total 0
drwxr-xr-x. 2 root root 60 Apr 20 10:31 ./
drwxr-xr-x. 21 root root 3660 Apr 22 18:51 ../
crw-rw-rw-. 1 root root 10, 200 Apr 20 10:31 tun
[root@shoonya ~]$ ll /dev/kvm
crw-rw-rw-+ 1 root kvm 10, 232 Apr 20 10:31 /dev/kvm ... already set
[root@shoonya ~]$ chown -R root.kvm /dev/net
[root@shoonya ~]$ ll /dev/net* -d
drwxr-xr-x. 2 root kvm 60 Apr 20 10:31 /dev/net/ ----> done
crw-------. 1 root root 10, 61 Apr 20 10:31 /dev/network_latency
crw-------. 1 root root 10, 60 Apr 20 10:31 /dev/network_throughput
[root@shoonya ~]$ ll /dev/net/
total 0
drwxr-xr-x. 2 root kvm 60 Apr 20 10:31 ./
drwxr-xr-x. 21 root root 3660 Apr 22 18:51 ../
crw-rw-rw-. 1 root kvm 10, 200 Apr 20 10:31 tun --> done
[root@shoonya ~]$ chmod -R 660 /dev/net
[root@shoonya ~]$ ll /dev/net* -d
drw-rw----. 2 root kvm 60 Apr 20 10:31 /dev/net/ --> done
crw-------. 1 root root 10, 61 Apr 20 10:31 /dev/network_latency
crw-------. 1 root root 10, 60 Apr 20 10:31 /dev/network_throughput
[root@shoonya ~]$ ll /dev/net/
total 0
drw-rw----. 2 root kvm 60 Apr 20 10:31 ./
drwxr-xr-x. 21 root root 3660 Apr 22 18:51 ../
crw-rw----. 1 root kvm 10, 200 Apr 20 10:31 tun --> done
[root@shoonya ~]$
[root@shoonya ~]$ tunctl -u <username>
Set 'tap0' persistent and owned by uid 1xxx
[root@shoonya ~]$ echo 1 >/proc/sys/net/ipv4/ip_forward
[root@shoonya ~]$ echo 1 >/proc/sys/net/ipv4/conf/wlp12s0/proxy_arp
[root@shoonya ~]$ echo 1 >/proc/sys/net/ipv4/conf/tap0/proxy_arp
[root@shoonya ~]$
[root@shoonya ~]$ ip link set tap0 up
[root@shoonya ~]$ ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
......
tap0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 66:7a:ec:c0:db:4e txqueuelen 500 (Ethernet)
.....
wlp12s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.69 netmask 255.255.255.0 broadcast 192.168.1.255
......
[root@shoonya ~]$ route add -host 192.168.1.201 dev tap0 --> picked up .201 randomly as it's not used on LAN
[root@shoonya ~]$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.254 0.0.0.0 UG 0 0 0 wlp12s0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlp12s0
192.168.1.201 0.0.0.0 255.255.255.255 UH 0 0 0 tap0
/usr/bin/qemu-kvm -m 1586 -localtime -vga std -cpu host -net nic -net tap,ifname=tap3,script=no -usb -device usb-tablet -cdrom /home/<username>/ISO/systemrescuecd-x86-3.8.1.iso -boot d
all this shit and doens't work w/ SELINUX as normal user.
HAVE TO RUN THE VM AS ROOT ... WORKS FINE AS LONG AS THE IP IS SET AS FOLLOWS:
ifconfig <int> 192.168.1.201 netmask 255.255.255.0 up --> IP address of the tunx interface
route add default gw 192.168.1.69--> IP address of the host machine.
This guy avoid reserving an IP on the LAN ....
https://shanetomlinson.com/2009/bridging-a-wireless-card-in-kvmqemu/