Visit the LQ Articles and Editorials section
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 09-03-2005, 12:13 PM   #1
LQ Newbie
Registered: Sep 2005
Posts: 1

Rep: Reputation: 0
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 -mask and gateway

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!
Old 09-03-2005, 02:34 PM   #2
Senior Member
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
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 as the gateway. I personally use MonMotha's firewall script to do the forwarding and firewalling for me.
Old 09-03-2005, 02:59 PM   #3
Senior Member
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
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 :
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
No!! internet on laptop with ubuntu!! zacklemon Linux - Networking 3 11-13-2005 10:05 AM
setting up internet on ubuntu 5.10 hazera Linux - Networking 2 11-05-2005 12:58 PM
help with internet on ubuntu kmorsch Linux - Newbie 1 11-03-2005 08:55 PM
connect to internet in ubuntu nancy25dec Ubuntu 13 05-01-2005 04:24 AM
using internet explorer in ubuntu Toaster Ubuntu 11 04-24-2005 07:32 AM

All times are GMT -5. The time now is 11:29 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration