LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   internet from ubuntu to xp (https://www.linuxquestions.org/questions/linux-networking-3/internet-from-ubuntu-to-xp-359860/)

billyK 09-03-2005 12:13 PM

internet from ubuntu to xp
 
hello guys !
i read the other posts but couldn't find the solution for my problem.
there we go : i recently installed ubuntu on my pc desktop and on the other machine, a laptop, i have installed Windows XP. How can i share the connection from the ubuntu machine to the XP machine because it isn't working !!!
I don't have a MAC address assigned to my computer or anything else.
Form win xp to win xp it was very simple everything was made automaticly so i didn't assign any ip address to my laptop machine (i left all fields blank).

What's the solution to leave also the ip address fields blank on the laptop (xp machine) ?
Are there any other solutions to share the connection ? I have both installed on ubuntu : eth1 and eth0 . eth1 is the one where the internet cable is plugged in. on my ubuntu machine the internet is working perfect.

please, can anyone explain me step-by-step the setup process ? i'm a newbie with ubuntu.

here are my ip addresses : IP 192.168.1.7 -mask 255.255.255.0 and gateway 192.168.1.101

thank you very very much in advance!

i hope there is someone out there who can help me and explain this to me step by step!

thanx guys!

TigerOC 09-03-2005 02:34 PM

Do a search for internet sharing Debian here at LQ. It is covered quite regularly. I have supplied detailed answers several times. A summary is that you need to install ip-masquerading and iptables (probably already installed) and then you need to get the Ubuntu box to forward connections on the subnet you are using. You need to get the xp box on the same subnet and then tell the xp box to use 192.168.1.7 as the gateway. I personally use MonMotha's firewall script to do the forwarding and firewalling for me.

Agrouf 09-03-2005 02:59 PM

1 -> how to leave ip address blank on the windows xp machine :
A : You need a dhcp server on the ubuntu machine. The windows machine has something called a dhcp client which gets its ip address automatically from a dhcp server.
Here's how to install dhcp3-server :
http://ubuntuguide.org/#dhcpserver
then you can check the 'get my address automatically' box on the windows machine and check that each machine can ping each other.

2-> how to share internet connection on the ubuntu machine :
A : you need the ubuntu machine to forward IP packets to the windows machine.
here's how to forward ip packets :
sudo iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
sudo echo 1 > /proc/sys/net/ipv4/ip_forward

All apologies for my very approximative english.


All times are GMT -5. The time now is 09:38 AM.