Solved

setting a gateway

Posted on 1998-09-27
1
199 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
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now