CoovaChilli with VMWare

Running CoovaChilli with VMWare Client

For development, VMWare can be used to easily simulate a hotspot user. The following illustrates how to configure a Linux system (Ubuntu in this case) running CoovaChilli and Windows Vista running inside VMWare as the client.

Setup a vmnetX interface

Select a vmnet interface to use. It should be one not already active in an ifconfig.

 # ifconfig vmnet0
 vmnet0: error fetching interface information: Device not found
But, the device itself should be there:

 # ls -l /dev/vmnet0 
 crw------- 1 root root 119, 0 2008-06-24 06:39 /dev/vmnet0
Bring up the interface:

 # vmnet-netifup /dev/vmnet0 vmnet0 &
 # ifconfig vmnet0 0.0.0.0 up

CoovaChilli configuration

Your chilli should then be configured to use the vmnet interface. You can do this using the HS_LANIF setting in etc/chilli/config or the dhcpif option directly in the chilli.conf. Here is a sample etc/chilli/config style configuration:

 HS_LANIF=vmnet0
 HS_NETWORK=192.168.90.0
 HS_NETMASK=255.255.255.0
 HS_UAMLISTEN=192.168.90.1
 HS_UAMPORT=3990
 HS_DNS1=192.168.90.1
Of course, the network should be one that your system is not already using.

Start chilli:

 /etc/init.d/chilli start

Other considerations

Assuming your system is not already configured to be a router, you may need the following iptables configuration to provide NAT for outbound traffic:

 # iptables -I POSTROUTING -t nat -o eth0 -j MASQUERADE
where eth0 is the WAN (or Internet) interface that has the default route. The chilli init script will do it for you, but also ensure the kernel will forward packets:

 # echo 1 > /proc/sys/net/ipv4/ip_forward 
In the chilli config above, we set the DNS server to that of the local interface. So, your system should be running a DNS server. In ubuntu, it's just a matter of:

 # apt-get install dnsmasq

Configure virtual machine Ethernet interface

Now, configure your vmware virtual machine to use the above configured interface, as shown here.

Launch a browser in the vmware guest, and it is just like being at a hotspot.