Things you need:
1 CROSS-OVER ethernet cable (for the computer->computer connection)
2 (total) network cards in the gateway (1 for the internet service, 1 for the compter-to-computer connection)
you'll need to set ip addresses for both computers:
if eth0 is used to connected to the internet, leave it alone for now.
assuming eth1 is connected to the windows XP machine, do this:
(as root users)
Code:
#ifconfig eth1 192.168.0.1 bcast 192.168.0.255 netmask 255.255.255.0
open the file /etc/sysctl.conf and modify the line that says
Code:
net.ipv4.ip_forward = 0
to
Code:
net.ipv4.ip_forward = 1
also, as root do this(to avoid having to reboot)
Code:
#echo 1 > /proc/sys/net/ipv4/ip_forward
as root again
Code:
#iptables -P FORWARD ACCEPT
#iptables -A POSTROUTING -t nat -s 192.168.0.1/24 -j MASQUERADE
that last part you'll want to put in a script that runs everytime you boot up. also, this setup is very NOT SECURE. Because you are new, i didnt go into the whole firewalling thing but you will want to learn iptables ASAP (like before you get the internet connection).
there are several threads on LQ (this site) about itables. try doing a search (4th blue button on the second row at the top, right-hand side of the screen). You should find a wealth of good examples. Also, here is a link to a howto taht i just "googled" for:
http://www.netfilter.org/unreliable-....linuxdoc.html
oh i almost forgot, you'll have to setup the windows machine:
1. give it an ip address of 192.168.0.X where X is anything except for 0, 1 or 255.
2. give it a netmask of 255.255.255.0
3. give it a gateway/default router of 192.168.0.1 (the linux box)
4. DNS servers will be whatever you get from you internet service provider.
the setup for win XP is located in Control Panel -> Network Connections.
RIGHT mouse click on the Local Area Connection icon
Click Properties
Highligh the line that say
Internet Protocol (TCP/IP)
then Click the
Properties button
you'll see a screen where you can enter in all that information.
to check that you have the right info entered in:
Click Start -> Run type "cmd" (without the quotes) and hit enter.
When you get teh command prompt type the command:
ipconfig /all
and you should see the information you entered.