While Internet Connection Sharing is a nifty tool, there are some cases where you would like to do the steps manually. One such case would be if the “primary” network is already using the 192.168.0.1/24 address space, since ICS is hardcoded (as far as I can tell) to use the same network. One concrete case I have encountered was:
ADSL Modem+Router (no wireless) –-> laptop broadcasting over writess –-> ... –-> other laptops
The solution is the following:
- Set up an ad-hoc network on laptop wifi card (using a different subnet – 10.0.0.0/24 for example)
- “Connect” to it to make it work:
- Enable IP forwarding on the machine from the registry
It is simple as 1-2-3 :-p. Some caveats though:
- This setup won’t give you DHCP. So make sure that you configure your other machines with a static IP address
- It also won’t give you DNS, so configure something like the Google DNS (184.108.40.206 or 220.127.116.11) or OpenDNS (18.104.22.168 or 22.214.171.124) or even your ISPs DNS
- The ad-hoc wifi connection has reliability issues. It happened multiple times that I had to restart it because it disconnected and wouldn’t connect any more, but it is a good temporary solution.
PS. You can download the drivers and user manual for the SmartAX MT882 ADSL Router here (the link might go dead unexpectedly, since it is served out of Dropbox). This is a standard modem provided by Romtelecom (the Romanian telecom provider) and I couldn’t find it elsewhere because Huawei is very secretive about its stuff (the files were copied from the CD provided with the modem). The driver makes the USB connection work as a network card (which is very elegant and simple).