August 10th, 2004, 09:14 AM
Internet Connection sharing from windows to linux
Ok, I am running Windows 2003 server enterprise edition as my main box at home. It is the one that has the modem hanging off it that connects to the net (duh!). Connected to my win2k3 server via cat5 crossover cable is a slackware linux 9.1 machine. I am currently surfing the net on the linux machine through the win2k3 one.... If you browse a lot of boards like www.linuxquestions.org or www.linuxnewbie.org etc.. quite a lot of them have no idea how to share the internet from windows to linux.. so I will explain it below.
(This was performed on windows 2003 server and slackware linux 9.1)
Firstly go to your Local network connection properties and then TCP/IP properties. Give the 2k3 machine an IP address of 192.168.0.1 and subnetmask of 255.255.255.0.
Apply the changes and exit.
next go Start > Programs > Administrative Tools > Configure your server wizard.
on the welcome screen hit "next"
on the preliminary steps screen, do as it says and make sure you have all network cables plugged in, you are connected to the net, all modems and NIC's are installed, all peripherals turned on and have the Windows 2003 server CD ready (you may not need it). Once you have all that click next (as it states)
It will then go and check everything out, doing its own little thing. Detecting your network settings
Next it will come up with configuration options > we will select "custom configuration"
It will then come up with the server role screen. Highlight the DHCP server option and click next.
Next it brings up the "summary of selections" screen. ensure it has the following:
Install DHCP server
Run the New Scope Wizard to configure a new DHCP scope
click next (it will go through and install the DHCP server, then it will configure it). It will bring up the "Welcome to the new scope wizard"
On the new scope wizard. hit next, then enter a name and definition for the new scope you are about to install (mine was [name = general, description = All clients on the network will get one of these addresses])
It will now ask you for an Ip address range. enter your start IP as 192.168.0.2 and your end Ip address as 192.168.0.50 (that is what i did). Ensure the subnet mask is 24 bits.
Unless you want to exlude any ip address you dont have to worry about the next bit so hit next again
Now we set the lease duration of the ip addresses .. Change it if you want.. I am just keeping it as 8 days.
The configure DHCP options screen will be displayed..
Do you want to configure the DHCP options for this scope now?
Ensure the yes option is checked then click next.
If you have a router as the default gateway you will want to add the IP in this screen, if not just click next.
We are now on the Domain Name and DNS Servers page. If you want to specify the parent domain the client computers on the network use for DNS name resolution or if you want to conifigure scope clients to use DNS servers on your network you can do that here .. otherwise (like me) just click next
If you have a WINS server enter it on this screen. "WINS Servers" screen. If not click next again
Do we want to activate this scope now?
Yes, I want to activate this scope now
Click next, then click finish.
Now go to the properties of your Internet connection and click "advanced"
- Check the "Allow other network users to connect through this computer's internet connection.
then click "ok"
NOW OVER TO THE LINUX BOX
As the super user (root) on your linux machine , run "netconfig"
Enter a hostname you want to use then hit enter
Now enter a domain name for %hostname% (your hostname)
- you can make this whatever .. it has no effect on the internet connection sharing .. infact none of this does except making the linux machine a DHCP client.
Now it comes up with the "setup IP address" screen
- Ensure at this screen you select the "DHCP" option and then hit enter
It will then ask you for a DHCP hostname. Don't worry about this just hit enter.
It will then ask you to confirm setup, ensuring the settings are correct (using a DHCP server) hit Enter to end the netconfig
It will then say "settings accepted. Basic network configuration is complete.
Now I am not sure if you need to reboot a linux machine after you change to DHCP or not but I did and when it came back up, I typed (with super user powers at the command line): route add default gw 192.168.0.1
I was then able to surf the net