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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-18-2005, 11:54 PM
|
#1
|
Senior Member
Registered: Jan 2005
Distribution: Slackware, BackTrack, Windows XP
Posts: 1,020
Rep:
|
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
|
|
|
03-19-2005, 12:53 AM
|
#2
|
Member
Registered: Dec 2003
Posts: 43
Rep:
|
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?
|
|
|
03-19-2005, 01:41 AM
|
#3
|
Member
Registered: Apr 2002
Location: Melbourne, Australia
Distribution: Gentoo
Posts: 273
Rep:
|
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
|
|
|
03-19-2005, 11:30 AM
|
#4
|
LQ Guru
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163
Rep:
|
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.
|
|
|
03-21-2005, 06:49 AM
|
#5
|
Senior Member
Registered: Jan 2005
Distribution: Slackware, BackTrack, Windows XP
Posts: 1,020
Original Poster
Rep:
|
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
|
|
|
03-21-2005, 11:59 AM
|
#6
|
LQ Guru
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 06:45 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|