how to access internet from a linux machine via a linux machine as gateway
Linux - NewbieThis 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.
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.
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.
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?
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
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.