LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-18-2005, 11:54 PM   #1
b0nd
Senior Member
 
Registered: Jan 2005
Distribution: Slackware, BackTrack, Windows XP
Posts: 1,020

Rep: Reputation: 45
how to access internet from a linux machine via a linux machine as gateway


hello all,

i've two systems and have windows XP as well as slackware 10.0 installed on both.
modem is connected to one system.....let say to system1

now wat i'm trying is that what ever o/s running on system1........the other system, lets say system2, shud have access to internet.......

i.e the following combinations:

system1(modem connected) system2
1> XP .......................................... XP
2> XP .......................................... Linux
3> LInux ......................................... XP
4> Linux ......................................... Linux

out of these i know configuration for first case only (being a window user .lol )......

NFS is not enabled on linux.......actually i was trying but didn't get success.

any sort of help will be highly appreciable.

regards
 
Old 03-19-2005, 12:53 AM   #2
tedfordgif
Member
 
Registered: Dec 2003
Posts: 43

Rep: Reputation: 15
You need two network connections on system1. This will typically be two different pieces of hardware. It sounds like you've got a telephone modem, so that's one. Do you have an ethernet card/port as well?
 
Old 03-19-2005, 01:41 AM   #3
Sutekh
Member
 
Registered: Apr 2002
Location: Melbourne, Australia
Distribution: Gentoo
Posts: 273

Rep: Reputation: 30
ok ruudra so yopu say that you know how to get the connection going for XP (i assume you mean using Internet connection sharing) so what you need is to do the same thing under linux.

To do this you will need a firewall. One of the most common uses for a firewall is to share an Internet connection using network address translation (NAT). There is a special type of NAT that does just what you need called masquerading. basically the way it works is system 2 will make a request for something outside your network (so on the internet for example) and that request will go to your default gateway (which you would have set to system 1). System 1 will get the request, re-write it before sending it out to make it look like it had sent the request. When the reply comes back system 1 will look up who sent the request in the first place and re-write the packet again so that it goes back to system 2 looking like it has come from the internet directly.

It is quite neat really. Anyway there are a variety of pre-made firewalls you can load up and try or if your feeling game check out the netfilter homepage

let us know how you go
 
Old 03-19-2005, 11:30 AM   #4
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
On the 'server' setup the dialup connection, local network, ip forwarding, iptables NAT Masq and a dhcp server.

Then plug anything using dhcp into the local network and it will connect.

If you prefer a static ip then use that instead of dhcp. you will need to configure the clients interface for static ip.
 
Old 03-21-2005, 06:49 AM   #5
b0nd
Senior Member
 
Registered: Jan 2005
Distribution: Slackware, BackTrack, Windows XP
Posts: 1,020

Original Poster
Rep: Reputation: 45
Thnx guys for helping me out......
I did wat "suteh" adviced me................just installed a firewall "shorewall"......and now i can access internet from system 2 also.

thnx once again !!!
regards
 
Old 03-21-2005, 11:59 AM   #6
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
well good that the problem is solved
but one thing needs to be corrected here that shorewall is not a firewall,the firewall is IPTABLES
shorewall is an interace to iptables

regards
 
  


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
sharing internet from a windows 98 machine to a Red Hat Linux machine ritwiksolutions Linux - Newbie 7 03-14-2006 10:20 AM
Downloading email with gateway linux machine colabus Linux - Newbie 1 06-20-2004 07:37 PM
How do u setup your linux machine so that u may access it from the internet? gonus Linux - Software 4 06-13-2002 11:56 PM
how do i use my linux machine to be a gateway for a windows machine? Sanjuro Linux - Networking 2 02-09-2002 04:29 AM
Setting up a Linux gateway machine inbar Linux - Networking 15 08-01-2001 10:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:31 PM.

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