LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-13-2006, 10:49 PM   #1
stefaandk
Member
 
Registered: Jun 2005
Distribution: Centos
Posts: 215

Rep: Reputation: 30
Question Basic routing problem.


Been googling all over the net for a solution and every time I end up with the most elaborate detailed guides as to how to setup internet sharing, setup nat etc, I'm after something simple.

I have 2 networks.

10.1.1.0/24
10.1.5.0/24

My linux box has got both interfaces configured as 10.1.1.5 and 10.1.5.1
10.1.1.1 is the default gw to get out to the net, these are internal networks.

network 10.1.5.0 is only connected on this box, all machines can get anywhere apart from 10.1.5.x addresses.
On the box itself I can ping 10.1.5.x addresses but from the outside I cannot so it doesnt' seem that my linux box is doing any routing for the outside.

Basically I need this machine to route between 10.1.1.0 and 10.1.5.0 networks and I can't get it working.
What do I need to configure/enable?

Thanks
 
Old 06-14-2006, 01:19 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
should just be an "echo 1 > /sys/proc/net/ipv4/ip_forward" (probably not the *exact* path..) to enable the routing between the interfaces. you won't need any source natting or anything as long as you have a route back from elsewhere to these sources.
 
Old 06-14-2006, 01:43 AM   #3
Notwerk
Member
 
Registered: Apr 2005
Location: Jordan
Distribution: Debian (Sarge), Ubuntu (6.06)
Posts: 271

Rep: Reputation: 31
Actually it's
Code:
#echo 1 > /proc/sys/net/ipv4/ip_forward
which will enable packet forwarding (i.e. allows packets to pass from one network to another).

Also, if you want "Packet Forwarding" to be enbled by default when you start this machine you should edit /etc/sysctl.conf to contain:
Code:
net.ipv4.ip_forward = 1
Happy hunting
 
  


Reply



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
Basic routing problem help please... pcy Linux - Networking 5 04-07-2006 05:25 PM
basic LAN routing captain_b Linux - Networking 1 11-18-2005 10:46 AM
Basic Routing broadband Linux - Networking 9 09-07-2004 12:44 AM
Basic routing pcrs Linux - Networking 1 10-07-2002 09:25 AM
Basic routing john.martelli Linux - Networking 3 03-25-2002 01:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:02 PM.

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