Question Locked

Recieve incoming connections on multiple nics in server

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

We have a server that has 2 nics installed with each an active internet connection. Each nic is connected to a router wich (by means of other routers) has an external ip associated. 1 is used for receiving connections like smtp and owa and browsing the internet. The other one is intended to be used as an fallback for receiving connections like smtp. I have 2 mxrecords set that points to the each of the external ip's.

Current situation:
---

connection 1:

router A (internet connected)
wan: 210.1.1.1 (bogey address)
lan: 10.0.0.138
has DMZ to 10.0.0.151 (router B)

router B
wan: 10.0.0.151
lan: 192.168.253.100
has port 25 forwarded to 192.168.253.30 (NIC1)

NIC1
ip: 192.168.253.30
sm: 255.255.255.0
gw: 192.168.253.100

router C (internet connected)
wan: 180.5.5.5 (bogey address)
lan: 10.10.0.1
has DMZ to 10.10.0.30 (router D)

router D
wan: 10.10.0.30
lan: 192.168.168.1
has port 25 forwarded to 192.168.168.2 (NIC2)

NIC2
ip: 192.168.168.2
sm: 255.255.255.0
gw: -

---

When I do a telnet on port 25 from home via the internet to the internet ip of router A I get a nice prompt from the exchange server so that route is working correct.

If I do the telnet on port 25 to the internet ip of router C it doesn't work. When I clear the gateway from NIC1 and put the address 192.168.168.1 in the gw of NIC2 then I do get a response when I retry the connection but then the route through router A and B to NIC1 doesn't work anymore.

I read on the internet it is a routing problem concerning 2 nics with each a seperate gateway to 2 different networks. I can't set a gateway for both connections because only 1 is used for the internet and it would generate untrusty behavior (or am i totally wrong again). Even if I do try for testing only 1 nic is responding to the incoming requests on port 25.

Having a gateway on NIC1 and none on NIC2, I put another computer on router C with the ip 10.10.0.10. When I do a telnet to 10.10.0.20 (router D) on port 25 I get no response. I discovered that if I do a 'add route -p 10.10.0.0 MASK 255.255.255.0 192.168.168.1 METRIC 20' I do get a response on 10.10.0.20 from the added computer. I tried adding several routes using 180.5.5.0 etc and other weird combinations (;-)) but no succesful connection from the internet on NIC2.

I read something about auto adding routes by macaddress, so every packet coming in at an interface is responded to at the same interface but that was for mac and not a windows computer. It looks to me that the problem is solved that way because now windows always responds to incoming packets from the internet on the nic with the gateway (or am i totally wrong again??)

I'm just looking into routing etc and I can't get it to work! Please advice.

f.y.i.: the server is an 2003 windows server with exchange 2003 installed and routing and remote access is running.

2 replies

by churdoo

Correct me if I'm wrong, but are you using soho NAT appliances for your routers? I think that may be the reason that you can't get the persistent routes (route add -p) to work the way you expect.

First, you have read correctly ... windows gets confused having multiple NIC's with multiple gateways, and it's not smart enough to say that "if a request came in to my IP that's on NIC2, then I want to send the response through NIC2." I've heard of some peeps solving this by applying a METRIC to the Advanced IP properties, but I think that will only work in your case if your NIC1 is essentially disconnected, or if your router B is down hard. I don't know, maybe you can try it.

Other than that, if my assumption of using NAT appliances is correct, then one more thing to try, albeit this is a longshot -- maybe you can switch your router D to 'router' mode instead of the default 'gateway' or NAT mode. Most of those appliances have this functionality. Doing this may make it such that you can add your static route 'route add -p 10.10.0.0 MASK 255.255.255.0 192.168.168.1' The more I think of this, I don't think it will work.

Lastly, if all of the above fail, then you may have to disable your NIC2 and replace your routers B and D with a single unit that has 2 WAN interfaces and is designed for this scenario (if you're talking SOHO gear then I'm thinking of something like the Linksys RV082 appliance).

Hope this helps.

This discussion is closed to new replies.