Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

setting a gateway

Posted on 1998-09-27
1
Medium Priority
?
207 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 150 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

How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

Question has a verified solution.

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

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Fine Tune your automatic Updates for Ubuntu / Debian
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

688 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