Share your knowledge at the LQ Wiki.
Go Back > Forums > > Member Intro
User Name
Password Member Intro New to Been a long time member but never made a post? Introduce yourself here.


  Search this Thread
Old 05-06-2009, 03:27 AM   #1
LQ Newbie
Registered: Nov 2005
Location: Dhaka
Distribution: RedHat
Posts: 1

Rep: Reputation: 0
routing in linux

I got the following ip block from my ISP. (Here is my gateway which is located in my ISP's Router, My useable ip is -

I have a linux pc with 2 NIC. I have putted in my eth0 which is connected to my ISP And in my eth1. My PC is directly connected to eth1. My pc ip is and gateway is

I can't go to internet. What I have to do in linux box. ip_forward=1 is already enabled. Plz help
Old 05-06-2009, 04:34 AM   #2
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
It is possible that your ISP router does not have a route to that is why the traffic is not coming back.
Old 05-06-2009, 05:38 AM   #3
LQ Newbie
Registered: Feb 2009
Distribution: debian, mandriva
Posts: 6
Blog Entries: 2

Rep: Reputation: 0
I (Tukang Nggame) have idea. Your linux pc use network

( gw Linux PC-eth1-( PC ( gw

ISP-----------------eth0--YOUR Linux PC--eth1---------Client PC

In Your Linux PC use NAT !

Last edited by arisnb; 05-15-2009 at 08:26 AM.
Old 05-06-2009, 07:05 AM   #4
LQ Newbie
Registered: Jun 2007
Posts: 1

Rep: Reputation: 0
Hi am Networking and linux newbie

Can some one help me to understand,

why do we need to add route in our system or gateway to connect to different network???

what is the concept of "add route -p" command

please help
Old 05-15-2009, 08:17 AM   #5
LQ Newbie
Registered: Feb 2009
Distribution: debian, mandriva
Posts: 6
Blog Entries: 2

Rep: Reputation: 0
Simple network :
Please read this artcle
Routing :
You can add in /etc/network/interfaces

up /sbin/route add -net [network] netmask [netmask] gw [gateway]


up /sbin/route add -net netmask gw

Last edited by arisnb; 05-15-2009 at 08:22 AM.


linux, network, routing, shorewall

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
pre routing , post routing and qos support msridhar87 Linux - Networking 0 02-13-2009 06:37 AM
Routing In Linux bil_nil Linux - Networking 1 10-01-2005 09:25 PM
Routing on Linux kanwar_rajan Linux - Networking 2 10-11-2004 06:55 AM
real routing under nat routing nothingmuch Linux - Networking 4 10-27-2003 04:11 PM
Routing with Linux? yes or no? davebarnes Linux - Networking 9 10-23-2002 01:01 PM

All times are GMT -5. The time now is 02:03 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration