« I am Blogger | Main | Whole New World »
May 19, 2003
Sharing Internet Access With NAT
The most common application for networked home computers is Internet sharing. Windows users generally have to find a Proxy Server to do this while Linux users are happy with boasting about IP Masquerading. My network has a Windows and Linux node. One can setup a network for internet sharing in a matter of few minutes with the help of NAT.
The most common application for networked home computers is Internet sharing. Windows users generally have to find a Proxy Server to do this while Linux users are happy with boasting about IP Masquerading. My network has a Windows and Linux node. NAT or Network Address Translation is probably not a new concept. In fact IP Masquerading is similar to it. I have so far been unable to discern the difference between the two. However the added complexity of installation for additional support for ftp, irc and other internet services leaves a lot to be desired. NATs seemed to be the answer to what I was looking for. One can setup a network for internet sharing in a matter of few minutes with the help of NAT.
So, what is NAT? Network Address Translation (NAT) is designed for IP address simplification and conservation, as it enables private IP internetworks that use nonregistered IP addresses to connect to the Internet. NAT operates on a router, usually connecting two networks together, and translates the private (not globally unique) addresses in the internal network into legal addresses before packets are forwarded onto another network. As part of this functionality, NAT can be configured to advertise only one address for the entire network to the outside world. This provides additional security, effectively hiding the entire internal network from the world behind that address. NAT has the dual functionality of security and address conservation, and is typically implemented in remote access environments. Technical details about this service can be found in RFC 1631.
This exercise will assume that your Windows machine connects to the Internet while your Linux box needs to be networked and setup for internet sharing. Here is a checklist of things you will require:
· One 10 Base T Coaxial cable.
· Two Terminators
· Two T Junctions
· Two 10Mbps Ethernet cards ( I own a Realtek 8029 and Compex RL2000 )
· Windows 95/98, Linux ( I run RedHat 6.1 and SuSE 6.3 )
· WinRoute 3.0 Lite (our NAT client for Windows )
Plug in your NICs (Network Interface Cards) into the two machines. Put the T junctions on the two NICs, connect the cables and plug in the terminators on either ends of the cable (on the free side of the T junction on each NIC). You will need to install the specific drivers necessary for their operation for both your nodes.
If you run RedHat, you should run netconfig. Enter IP address as 192.168.0.1, Netmask 255.255.255.0, Default Gateway (IP) 192.168.0.2 and Primary Nameserver 12.168.0.2. Reboot and check to see if your eth0 interface is up by typing netconfig at your shell prompt. With SuSE you would need to run yast and enter the System administration/Network configuration/Network Base menu. Press F6 here to enter the IP setup menu where you will need to enter the information presented above.
Switch to your Windows machine and enter Control Panel...Network...TCP/IP->xxx Network Card. In the IP address tab bar click on "Specify an IP address" and enter the IP address as 192.168.0.2 and Subnet mask as 255.255.255.0. Click OK and restart your machine for settings to take effect.
Run the Winroute 3.0 client on your Windows machine and click on settings. Type in the DNS address for your ISP in DNS server. Minimize it. Your machines are now configured for sharing Internet connection!! Dial up to your ISP and try to connect to a web site from your Linux node.
Posted by amitc at May 19, 2003 06:27 PM