Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
I am a fairly new Linux user and very new to networking!
I have set up a small (2 computer) private network. I have one machine running Mandrake Linux 10.0 (kernel 2.6.3-7) which is connected to the internet via a modem using PPP and is also connected via ethernet to my private local network.
My second machine is running TINY Linux (kernel 2.2.6) and is connected to the private network only.
I have managed to set up both so that they can talk to each other (ping, NFS, ftp etc) and wanted to set up the machine connected to the internet as a gateway. I have gone through all the steps I can find in various howto's etc but I just cannot access the internet from my private network.
I have set up a gateway machine using 'route add' and if I ping an external site such as 'yahoo' it manages (after a small delay) to resolve the name to an IP address, but it cannot access it.
What am I doing wrong? Do I need to set up some sort of packet routing on my gateway. Here is the output of 'route -n' from the gateway:
--------------------------
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
195.92.66.197 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 195.92.66.197 0.0.0.0 UG 0 0 0 ppp0
--------------------------
And from the machine on my private network:
--------------------------
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
--------------------------
One thing that I have done is stopped shorewall - my firewall program - as it was blocking my connections to and from the two machines - would this cause a problem?
If the computer in your private network is using an RFC1918 private IP address (ie 192.168.x.x) then you need to set up IP Masquerading on your gateway machine.
I have managed to get my gateway to work using the links you gave me....I am not entirely sure HOW it is working (as I just copied the rc.firewall script)....but it works nethertheless....!!!
.I am not entirely sure HOW it is working (as I just copied the rc.firewall script).
Well that was easy huh!
My guess is that if you are using a stock kernel, then all the modules you needed were built and waiting to be loaded. The firewall script itself has code that loads the modules, so you were off to the races.
Just remember that if you build a custom kernel you should follow the advice in the howto to make sure the needed modules get built.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.