OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: 2 NIC's 1 receive and one send?

From: Jeroen Vriesman (jeroen.vriesmanexperian.nl)
Date: Thu Apr 17 2003 - 02:39:25 CDT


If you are using linux there is a nice way to do that without having to change the postfix configuration, or running two instances.

I suppose you have two nic's, both having an internet connection.

The unusual thing is that they should both have a default route to a different gateway, and normaly you can only have one default route on one machine.

But if you compile a linux kernel with 'multiple tables' enabled, you can use the routing table you have now as the default one, and create another routing table with a default route to the other gateway of the other internet connection.

like this:

ip ro add 0.0.0.0/0 via <addres of NIC2> table 10

Now, with iptables, you can mark the packets, use 'newly initiated connection, coming from owner postfix, outgoing to port 25, or related'.

And then, with 'ip ru add' you can make a rule which says that these marked packets should use routing table 10.

That's all.

isn't it magic? I used it here to run applications which were on multiple machines in the past on one machine now.

On Wed, 16 Apr 2003 14:50:44 +0200
"Siemens Thomas" <thomas.siemensweb.de> wrote:

> Hallo!
>
> Can somebody please point me to instructions on how to setup postfix with 2 NIC's one receiver and one sender for mail proxy [firewall setup] firewall configuration. I have one very busy site that only has 256K connection to internet.
> ______________________________________________________________________________
> UNICEF bittet um Spenden für die Kinder im Irak! Hier online an
> UNICEF spenden: https://spenden.web.de/unicef/special/?mc=021101
>