Routing between 2 Interface Cards

  • A.Kannan
  • Graduate
  • Graduate
  • User avatar
  • Joined: Oct 22, 2005
  • Posts: 216
  • Loc: Sivakasi, TamilNadu, India
  • Status: Offline

Post March 6th, 2006, 4:00 am

Hello Sir

I am using Redhat Linux 9.0 Server.

Server has two Network Cards.

NIC 1 is connected in Switch 1. NIC 2 is connected in Switch2.

NIC 1 IP : 10.0.0.3/255.0.0.0 (eth 0)
NIC 2 IP : 192.168.0.103/255.255.255.0 (eth 1)

How to routing between two interface cards

Thank You
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post March 6th, 2006, 4:00 am

  • PsyckBoy
  • Graduate
  • Graduate
  • No Avatar
  • Joined: Jun 20, 2005
  • Posts: 204
  • Loc: SoCal
  • Status: Offline

Post April 8th, 2006, 10:56 am

You could do this with iptables, but I find that tedious and messy. Check out a piece of software called firehol. You could then configure it with something like:
Code: [ Select ]
interface eth0 lanOne
    policy accept

interface eth1 lanTwo
    policy accept

router lanOne2lanTwo inface eth0 outface eth1
    masquerade
    route all accept
  1. interface eth0 lanOne
  2.     policy accept
  3. interface eth1 lanTwo
  4.     policy accept
  5. router lanOne2lanTwo inface eth0 outface eth1
  6.     masquerade
  7.     route all accept
This should allow hosts on switch 1 using your server as a gateway to reach hosts on switch 2.

If you also want hosts on switch 2 to be able to reach hosts on switch 1, you would just add another router statement to the config:
Code: [ Select ]
router lanTwo2lanOne inface eth1 outface eth0
    masquerade
    route all accept
  1. router lanTwo2lanOne inface eth1 outface eth0
  2.     masquerade
  3.     route all accept


Of course, you can also configure it to only route certain types of traffic if you like, but you should try to get the above working first as it's the simplest setup.
  • A.Kannan
  • Graduate
  • Graduate
  • User avatar
  • Joined: Oct 22, 2005
  • Posts: 216
  • Loc: Sivakasi, TamilNadu, India
  • Status: Offline

Post April 13th, 2006, 9:16 pm

Hello Sir,

Whether if any Built in package is available in Redhat Linux

Thank You

A.Kannan
  • PsyckBoy
  • Graduate
  • Graduate
  • No Avatar
  • Joined: Jun 20, 2005
  • Posts: 204
  • Loc: SoCal
  • Status: Offline

Post April 13th, 2006, 11:52 pm

An RPM is available in the Downloads section on the firehol website.

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 78 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.