Configure 2 NICs - ext. static IPs on same network
I've search the forums and the general internet for an answer to this perplexing problem I'm experiencing and can't seem to find a scenario that is similar to mine. Here is my setup and problem:
Linux (FC7) server has 2 NICs, both of which are on the same subnet and have static IPs. Below is an example of what my setup would look like:
eth0: IP=18.104.22.168 SUBNETMASK=255.255.255.0 GW=22.214.171.124
eth1: IP=126.96.36.199 SUBNETMASK=255.255.255.0 GW=188.8.131.52
Trying to accomplish:
I'm trying to configure the linux routing table so that incoming BIND queries on eth1, port 53, go out eth1 (the same way they came in). Additionally, I want incoming BIND queries on eth0, port 53, to go out eth0 (the same way they came in). In essence, I have ns1.myserver.com pointed to eth0 and ns2.myserver.com pointed to eth1.
Herein lies the problem -- When I add a default gateway, it has to be one OR the other, but that doesn't work for my setup. When searching the forums and internet, I find lots of solutions if you happen to have two different networks setup on two different NICs. I do not -- both are on the same network.
Keep in mind that I have Netfilter already configured to process and route/forward packets where they need to go. The big problem I have is routing responses out of both eth1 and eth0 (depending on how they come in, of course).
Thanks a bunch!!