nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

Routing

This is a discussion on Routing within the Linux software forums, part of the Linux Getting Started category; Dear All, I want to isolate my existing network. supoose i have existing network as 192.168.1.0/24 and i want to ...


Go Back   nixCraft Linux Forum > Linux Getting Started > Linux software

Linux answers from nixCraft.


Linux software General questions and discussion about Redhat/Fedora Core/Cent OS, Debian and Ubuntu Linux related to softwares should go here.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 13-06-2006, 06:39 PM
Junior Member
User
 
Join Date: Jan 2005
Location: Pune
OS: RHEL/Fedora
Posts: 27
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
rajuk is on a distinguished road
Send a message via Yahoo to rajuk
Default Routing

Dear All,
I want to isolate my existing network.
supoose i have existing network as 192.168.1.0/24 and i want to isolate it as 192.168.2.0.
I have used linux based router for this purpose. i.e. two network
cards. one card for 192.168.1.0 and second card for 192.168.2.0. but still i am not able to access the PC's from two different networks. I have keep value for net.ipv4.ip_forward = 1 in kernel sysctl configuration file.

Also route command shows following :

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
192.168.2.0 * 255.255.255.0 U 0 0 0
eth1
192.168.1.0 * 255.255.255.0 U 0 0 0
eth0
169.254.0.0 * 255.255.0.0 U 0 0 0
eth1
127.0.0.0 * 255.0.0.0 U 0 0 0
lo
default 192.168.1.90 0.0.0.0 UG 0 0 0
eth0

Thanks & Regards,
Raju
Reply With Quote
  #2 (permalink)  
Old 13-06-2006, 07:42 PM
tom tom is offline
Contributors
User
 
Join Date: Jun 2005
Location: London, UK
Posts: 213
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 5
tom is on a distinguished road
Default

Hello rajuk,

You need to type or use iptables commands, then only it will route.

Code:
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface eth1 -j ACCEPT
Reply With Quote
  #3 (permalink)  
Old 13-06-2006, 08:08 PM
monk's Avatar
Senior Member
User
 
Join Date: Jan 2005
Location: Tibet
OS: Debian GNU/Linux
Posts: 506
Thanks: 0
Thanked 8 Times in 6 Posts
Rep Power: 7
monk has a spectacular aura about monk has a spectacular aura about
Default

Do you want multi-homing network?

Just set correct IP for eth0 and eth1, then type command:
Code:
echo 1 > /proc/sys/net/ipv4/ip_forwarding
sysctl -p
Now you should able to use it.
Reply With Quote
  #4 (permalink)  
Old 16-06-2006, 06:08 PM
Junior Member
User
 
Join Date: Jan 2005
Location: Pune
OS: RHEL/Fedora
Posts: 27
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
rajuk is on a distinguished road
Send a message via Yahoo to rajuk
Default

hi,
thanks all of you for support.
It's working now.

Raju
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Routing/copying data from eth0 and send over eth1 and eth2 theVOID Networking, Firewalls and Security 2 14-04-2008 05:02 PM
Routing tables flushed milank Linux hardware 3 24-12-2007 11:51 AM
Routing Tables flushed milank CentOS / RHEL / Fedora 0 05-11-2007 11:26 PM


All times are GMT +5.5. The time now is 05:49 AM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38