LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-16-2004, 02:52 PM   #1
sagi7ario
LQ Newbie
 
Registered: Mar 2004
Posts: 5

Rep: Reputation: 0
How do I share my Internet Connection?


I have PC with Windows XP Pro installed, that is connected to a ADSL line through my Ethernet Card, and a laptop with Mandrake 9.2 connected with a crossed over cable.

What have I got to do, to share my Internet connection with my portable computer on Mandrake9.2?

tanks
 
Old 03-16-2004, 03:00 PM   #2
fredgt
Member
 
Registered: Feb 2004
Location: Belgium
Distribution: Suse 9.1 Pro / Gentoo
Posts: 114

Rep: Reputation: 15
You will probably only have one IP available from your provider so i think the easiest way is to put a router between the modem and the PC and laptop.
The router will get the IP address from your provider (if they use dinamic IP's)
the pc and laptop connect to the rooter witch gives the both of them an IP address
 
Old 03-16-2004, 04:28 PM   #3
sagi7ario
LQ Newbie
 
Registered: Mar 2004
Posts: 5

Original Poster
Rep: Reputation: 0
without router.

without router.
 
Old 03-16-2004, 05:17 PM   #4
binhnx2000
LQ Newbie
 
Registered: Feb 2004
Location: Paris
Distribution: Redhat 8.0 - Mandrake 9.0
Posts: 5

Rep: Reputation: 0
First you need enable IP Forwarding on PC Gateway:

#echo "1" > proc/sys/net/ipv4/ip_forward
#iptables -t nat -A POSTROUTING -o $internet_iface -j MASQUERADE

- $internet_iface = iface you use to connect to Internet

Now! Set ip for gateway PC (IP on your LAN)

Example: IP: 192.168.0.1 an netmask 255.255.255.0

#ifconfig eth0 192.168.0.1 netmask 255.255.255.0

Restart Inteface Network to enable all change:

#/etc/init.d/network restart

Good! From client you wan connect out to Internet by Gateway. You set default gateway to use PC gatway = 192.168.0.1

Good Luck
 
  


Reply



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
Share Internet Connection sam_casperson Linux - Networking 3 02-03-2005 06:07 PM
Help! Cannot share my Internet connection... Domiriel Linux - Networking 2 11-25-2003 01:27 PM
how to share internet connection digihall7 Linux - Networking 5 10-22-2003 11:53 PM
how to share internet connection digihall7 Linux - Networking 2 09-23-2003 03:42 PM
HOW to share Internet connection zaldyd Linux - Newbie 1 07-25-2003 12:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:20 AM.

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