Routing between 2 Interface Cards

  • A.Kannan
  • Graduate
  • Graduate
  • User avatar
  • Posts: 216
  • Loc: Sivakasi, TamilNadu, India

Post 3+ Months Ago

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
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • PsyckBoy
  • Graduate
  • Graduate
  • PsyckBoy
  • Posts: 204
  • Loc: SoCal

Post 3+ Months Ago

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
  • Posts: 216
  • Loc: Sivakasi, TamilNadu, India

Post 3+ Months Ago

Hello Sir,

Whether if any Built in package is available in Redhat Linux

Thank You

A.Kannan
  • PsyckBoy
  • Graduate
  • Graduate
  • PsyckBoy
  • Posts: 204
  • Loc: SoCal

Post 3+ Months Ago

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 28 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
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.