You are on page 1of 3

UPDATE After a little bit of playing around, I got this thing to work (miraculously).

netsh is about the most undocumented POS I have every seen (but i digress.) Here's what you gotta do. 1. Change this registry key: My Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Par ameters\IPEnableRouter from 0 (off-default) to 1 (enabled). This enables ip forwarding in Windows XP. This is crucial. 2. You need to disable ICS and the Windows Firewall (if running SP2). This is done by going to control panel, administrative tools, services, and finding "Windows Firewall/Internet Connection Sharing (ICS)." Shut this service down, and then disable it. 3. You then need to enable "Routing and Remote Access." Change its status from disabled to "Automatic" and then start it. 4. Now you can proceed with the netsh commands (in my example Local Area Connection is the NIC connected to the internet and COLinux is the TAP interface for COLinux):
netsh netsh netsh netsh routing routing routing routing ip ip ip ip nat install nat add interface "Local Area Connection" full nat add interface "COLinux" private dnsproxy install

5. In COLinux, set your defaultgw to the IP of the COLinux nic on your XP box. This works like a champ. Hope this helps! NOTE This also works on WinXP Home edition! Another person's comment: Works on WinXP Media Center - Open Administrative Tools and click on Services - These services are NOT on by default, you need to turn them on. NOTE If you get this error, you have typed the name of the adapter incorrectly.
The interface 'adapter name' does not exist. An interface with this name is not registered with the router.

If you get this error alone.


An interface with this name is not registered with the router.

Then type this:


netsh routing ip add interface name="adapter name" state=enable

Yet Another version :

As it turns out, the RRAS solution only works for real network adapters, not dialup networking. So if you have a USB dsl or cable modem hooked up directly, RRAS will not share to it. You would need to install a network adapter and connect an RJ45 cable to the device, if it has such a port. Otherwise the only other solution at this point looks like sygate, winroute, or nat32. There are many freeware proxy servers, what you could do, is install one, then socksify each linux or windows system. That way, all your applications will be able to transparently access the proxy. Still looking for a freeware NAT solution though... Yet another update about DIAL-UP: If you want to share your internet with dial-up internal connection (you have dial-up modem and someone connect to you over this modem) use this command with above: netsh routing ip nat add interface internal private But different Windows XP languages has different names of "internal" interface. So try to use native language to define "internal" interface name. You may read details here: http://support.microsoft.com/kb/310888

[edit] Using Bridged Network


I started of with the first part of the documentation here but unfortunatly it wasn't sucessful. And I really didn't wanted to change too much in my windows (e.g. registry) Then I just tried to make the network bridge - and voila! It is working perfect. Here is what my setup looks like:

Hardware router for internet access = 192.168.2.1 The PC's itself is using DHCP (provided by the HW router) I created a bridge with the real NIC and the coLinux NIC this bridged Network is using DHCP to configure itself (just as the real NIC was doing before) in coLinux I configured eth0 to have an address in the same subnet as the real local network (ifconfig eth0 192.168.2.22) in coLinux I defined the HW router as default gateway (route add default gw 192.168.2.1)

From now on all my test pings to local addresses and internet domains were sucessful. best regards KateiRen

Ugh, I've tried every one of these recipes without success... :( The one for netsh tells me I have to install NAT, but then gives me a message that NAT is already installed...

<ionreflex> Sometimes netsh seems to be not consistent : I tried to uninstall it and reinstall right away, but gave me the same errors; I had to reboot my XP to reset it and configure it again...

The paragraph titled "Using Bridged Network" above works with HW router. Only thing not mentioned in the setup steps is that after you create the bridge (by ctrl-selecting the two interfaces and right-click->bridge), you need to right click->properties of the bridge and then select your 'real' and 'colinux' interfaces, press 'ok'. Then both interfaces should show as enabled and bridged once colinux has booted. It seems like this step should not be needed but that's what I needed to do to get it to work. devsk

Using WinXP Pro, it is possible to configure NAT without using the TAP device : since WinPCap make it possible to bridge between coLinux and XP, I installed the MS Looback interface and bridge it to coLinux; then I enabled NAT via netsh between my LAN adapter and the Loopback adapter and voil, it's working! But it is slower than a simple bridge, way slower...

You might also like