Results 1 to 2 of 2
Hi,
the following situation:
I have 1 root-server with 2 NICs, both having their own internet IP addresses:
Code:
eth0 = 8x.x.x.183
eth2 = 8x.x.x.205
We only have one gateway ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-13-2009 #1Just Joined!
- Join Date
- Sep 2009
- Posts
- 3
Setup 2 NICs with access to the internet with 1 gateway
Hi,
the following situation:
I have 1 root-server with 2 NICs, both having their own internet IP addresses:
We only have one gateway on that network:Code:eth0 = 8x.x.x.183 eth2 = 8x.x.x.205
We want to use eth2 for postfix + http, and eth0 for all the other stuff.Code:gateway = 8x.x.x.1
How can this be setup ? With route / ip route / iptables ?
- 09-16-2009 #2Just Joined!
- Join Date
- Aug 2009
- Location
- Mumbai, India
- Posts
- 75
Hi,
Just a cross-query.
. Having two NIC's with two gateways seems plausible enough, but you seem to have a config of two NIC and one gateway. Need to get your opinion about the logic behind it...
By sheer logic of traffic flow,
1) For traffic coming from the internet to local system / network, on the gateway you would need to configure a port based routing to the linux interface. Wonder if this would be effective, if at all possible, since you have a single gateway/ single uplink ( i assume ) to the gateway.
2) For traffic from the local network to the internet, you would have to configure the routes on individual systems.
3) I ideally don't see how you could configure policy based routing on the linux system itself for the given scenario and there would be no point doing so after the traffic has already hit an interface and you then feel it needs to have hit the other interface. I've not come across such an requirement.... so hope you understand the reason behind a cross query...
Just to answer your final query, policy based routing would require a combination of iptables and iproute since you would mark the packets with iptables and then route them through different routing tables with different default gateways....
--Syd


Reply With Quote
