VMware and Wireless Networks

I have just installed the 30 days trial version of VMware on my laptop.
It has a double purpose in my case: home banking and cross browser testing of websites. Currently both require access to MSIE. I know there are banks with home banking systems that work with Linux/Mozilla, and I also use one such bank, but I have good pecuniary reasons to stay with one Danish bank that doesn’t. Website testing requires access to several versions of MSIE to be sure.
VMware doesn’t support Debian systems as the host OS, but it works quite well, nonetheless. It is a funny feeling watch Windows boot in a window 🙂 but also reassuring to know it happens in a sandbox.
The only problem I had was getting the VM to communicate with the rest of the world through my wireless NIC. If I set up the normal eth0 interface as a bridged interface in the VM, everything was fine, but if I switched it to the wireless (an Atheros based card using the madwifi driver), there were no connection. After many tries I got the VM to communicate with the world outside using a NAT interface.
Only later I discovered here that it is not possible to use a wireless NIC as a bridged interface wth VMware. There is a short thread about this on VMwares support forum.


Comments

9 responses to “VMware and Wireless Networks”

  1. Rob Davis avatar
    Rob Davis

    Hmmm, wondering about a solution to this…

    I have an eth card which is not doing anything in the machine since I switched to wireless. I am wondering about creating internet connection sharing from the ath0 device to the eth0 and then bridging the eth0 device.. Will let you know if I get it working for vmware..

  2. Rob Davis avatar
    Rob Davis

    Yup, it works..

    In brief:

    I dhcp off the wireless network.
    I have installed a dhcp server and iptables on my machine..

    I brought up eth0 on a different subnet, and run the script posted below, after changing my dhcpd.conf file to reflect my local subnet.. Hope this helps..

    #!/bin/sh
    echo -e ”
    Loading simple rc.firewall version $FWVER..

    IPTABLES=/sbin/iptables
    DEPMOD=/sbin/depmod
    INSMOD=/sbin/modprobe
    #Setting the EXTERNAL and INTERNAL interfaces for the network
    #
    EXTIF=”ath0″
    INTIF=”eth0″
    #INTIF2=”ppp0″

    echo ” External Interface: $EXTIF”
    echo ” Internal Interface: $INTIF”
    echo ” Second Internal Int: $INTIF2″

    #======================================================================
    #== No editing beyond this line is required for initial MASQ testing ==
    echo -en ” loading modules: “

    # Need to verify that all modules have all required dependencies
    #
    echo ” – Verifying that all kernel modules are ok”
    $DEPMOD -a

    echo “———————————————————————-“

    echo -en “ip_tables, “
    $INSMOD ip_tables

    echo -en “ip_conntrack, “
    $INSMOD ip_conntrack
    #Load the FTP tracking mechanism for full FTP tracking
    #
    # Enabled by default — insert a “#” on the next line to deactivate
    #
    echo -en “ip_conntrack_ftp, “
    $INSMOD ip_conntrack_ftp
    #Load the IRC tracking mechanism for full IRC tracking
    #
    # Enabled by default — insert a “#” on the next line to deactivate
    #
    echo -en “ip_conntrack_irc, “
    $INSMOD ip_conntrack_irc
    echo -en “iptable_nat, “
    $INSMOD iptable_nat
    echo -en “ip_nat_ftp, “
    $INSMOD ip_nat_ftp

    #echo -e “ip_nat_irc”
    #$INSMOD ip_nat_irc

    echo “———————————————————————-“

    echo -e ” Done loading modules.

    echo ” Enabling forwarding..”
    echo “1” > /proc/sys/net/ipv4/ip_forward

    echo ” Enabling DynamicAddr..”
    echo “1” > /proc/sys/net/ipv4/ip_dynaddr
    echo ” Clearing any existing rules and setting default policy..”
    $IPTABLES -P INPUT ACCEPT
    $IPTABLES -F INPUT
    $IPTABLES -P OUTPUT ACCEPT
    $IPTABLES -F OUTPUT
    $IPTABLES -P FORWARD DROP
    $IPTABLES -F FORWARD
    $IPTABLES -t nat -F

    echo ” FWD: Allow all connections OUT and only existing and related ones IN”
    $IPTABLES -A FORWARD -i $EXTIF -o $INTIF -m state –state ESTABLISHED,RELATED -j ACCEPT
    $IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT
    echo ” FWD: Allow all connections OUT and only existing and related ones IN”
    $IPTABLES -A FORWARD -i $EXTIF -o $INTIF2 -m state –state ESTABLISHED,RELATED -j ACCEPT
    $IPTABLES -A FORWARD -i $INTIF2 -o $EXTIF -j ACCEPT
    $IPTABLES -A FORWARD -j LOG

    echo ” Enabling SNAT (MASQUERADE) functionality on $EXTIF”
    $IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE

    echo -e ”
    rc.firewall-2.4 v$FWVER done.

  3. I’m going to use NAT to be able to access my server (my setup: VMWare on Linux host, connected with WLAN to a server). The problem is that my server also needs to be able to initiate connections to the VMWare virtual machine. In order to do this, I’ll set up an OpenVPN connection with the server. That should get things going.

  4. Douglas E. Warner avatar
    Douglas E. Warner

    Drat – so this is why it didn’t work last night 😛
    I guess the good news is it sounds like VMWare is going to support this in Workstation 5.5; the beta page is here:
    http://www.vmware.com/produ

  5. It is bridge over wireless nic alright. All you need to do is to edit the file /etc/vmware/locations to reflect the ethx of your wireless device by replacing whatever is currently there. So if you use eth0 as your main bridging device, change all occurences to ethx (of your wireless nic), restart vmware services i.e. /etc/init.d/vmware restart and it should work. At least it did for me Ubuntu 5.10 with VMware workstation 5.

    I have more instructions here http://www.eibrand.net/blog

    Hope it helps

  6. I can get internet access on my vmware station by using NAT but my virtual OS is not detecting a wireless connection (which I need it to) so I can use wireless tools such as kismet. Is there any way around this?

  7. I can get internet access on my vmware station by using NAT but my virtual OS is not detecting a wireless connection (which I need it to) so I can use wireless tools such as kismet. Is there any way around this?

  8. I used Richard’s instruction above, it worked after the vmware restart. I am using ubuntu v6.10 as host. Run window xp as guest OS for office works. Using Linksys 54g wireless card. The wireless card works in both host and guest OS now. Cool.

  9. sarla999 avatar
    sarla999

    Vmware support IPW2000??

Leave a Reply

Your email address will not be published. Required fields are marked *