Reference Manual

HOW TO use NAT32 with coLinux
HOW TO use NAT32 with andLinux

CoLinux provides the necessary run-time support to allow any desired Linux Operating System to run within a Virtual Machine on Windows 2000 (and later) systems. Networking support is via the TAP-WIN32 driver by James Yonan.

The coLinux wiki has several excellent contributions on how to setup Networking for coLinux, but most of them assume that Windows ICS is being used to provide Internet connectivity.

If NAT32 is being used for this purpose, the trick is to configure the TAP-WIN32 Adapter with a unique private IP address that is not on the same subnet as your Windows private LAN Adapter. For example, if your private LAN Adapter has the IP address 192.168.0.1, give the TAP-WIN32 Adapter the address 192.168.1.1, mask 255.255.255.0 and no gateway.

Then, within coLinux, give the eth0 interface the IP address 192.168.1.2, mask 255.255.255.0 and gateway 192.168.1.254. This is done by editing the file /etc/network/interfaces with nano, a Linux editor.

The file should then be similar to the following:

# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
auto lo
iface lo inet loopback

# The first network card - this entry was created during the Debian installation
# (network, broadcast and gateway are optional)
auto eth0
iface eth0 inet static
   address 192.168.1.2
   netmask 255.255.255.0
   gateway 192.168.1.254

A DNS Server address of 192.168.1.254 should be specified in file /etc/resolv.conf.

Then configure NAT32 to share your Internet Connection and to use the TAP-WIN32 Adapter as the private LAN interface. You can of course also bind NAT32 to your real private LAN adapter (192.168.0.1 in this example).

This setup was tested with Debian Linux and the VNC Server. The VNC Viewer was run under Windows and provided a graphical user interface to the Linux system. Full details on how to setup Debian and VNC can be found here.

NAT32 can start coLinux with the command: win net start "colinux" and terminate it with the command: win net stop "colinux" .

Note that the above commands assume the name of the coLinux service is "coLinux". Use whatever name you have given the service, but be sure to enclose that name in quotes if it contains spaces.

You can then start a Console that attaches to the running coLinux by running the program colinux-console-fltk.exe located in your coLinux install directory.

Once you have logged on and started the VNC server, you can close the coLinux console as it is no longer needed.

Similar setup instructions apply to andLinux, although in this case, you need to use different IP addresses and only specify NAT32's private IP address as the default gateway and DNS address within andLinux.