Solved

setting a gateway

Posted on 1998-09-27
1
205 Views
Last Modified: 2013-12-15

We have a dedicated 64kbps link to internet, we want to use linux as a gateway for our LAN.

 The set up i thought is like this.


  ---------      --------       ---------  
    LAN    |====| LINUX  | ==== | ROUTER |
  ---------      --------       ---------  

 I set up two ethernet cards in linux. I want to send packets coming from lan to router. Linux is not sending packets to second interface, How to transfer data between these two  interfaces.
We are using redhat 5.0
thanks
sarma
local lan and other is connected to an other
0
Comment
Question by:sarmaas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 51

Accepted Solution

by:
ahoffmann earned 50 total points
ID: 1630904
assuming your NIC connected to LAN has IP 192.168.1.1,
and you NIC connected to ROUTER has IP w.x.y.z1, and
your ROUTER has IP w.x.y.z2, then you need following:

route add -net 192.168.1.0 gw 192.168.1.1
route add -net w.x.y.0 gw w.x.y.z1
route add -net default gw w.x.y.z2


I don't know if redhat has an appropriate config file (/etc ?),
but you should add these commands anywher in the rc startup
scripts.
Also make shure that you kernel has enabled IP_FORWARDING
0

Featured Post

Congratulations! You’re Certified – Now What?

Starting a new career can be overwhelming. Becoming certified in your field of expertise is a great start, but where do you go from here?  Here are some tips to help you on your career journey.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question