Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple WAN interfaces



On Oct 13, 2007, at 8:28 AM, Dave Sheeran wrote:

I have recently had installed a second ADSL line to give a bit of security for if we have trouble with our existing line/provider.
...
I was hoping to list the 2nd line as an MX backup so if line 1 is down there would still be a route through to our mail server.

Unfortunately, I don't think that it's going to work that way. In this configuration, the box can receive traffic on either of its two interfaces, no problem. The trouble is that the mac will always use its "default gateway" for all outbound traffic that doesn't have an explicit route (regardless of the interface the traffic came in on). The default route on the mac is the gateway on the card with the highest priority. As you observed, whichever of your two cards is the primary is the one that will "work". In reality, both cards are receiving traffic just fine, it's just that the return traffic is getting routed out the "wrong" interface and probably being dumped by the host on the other end (because it appears to come from the "wrong" host). You can verify this by running tcpdump or another sniffer; you'll see the packets coming in, and the packets going out, but the outbound traffic will have the wrong source IP for the network it's on.


What you WANT is for the machine to "remember" which interface traffic came in on, and use that interface to route the responses back. I'm not sure if this is possible under Mac OS X; you can do it with some trickery under OpenBSD (using PF's "route-to" directive), and probably under other systems as well (haven't tried). It's not ideal, but short of getting your own netblock and getting your ISPs to participate in a legitimate routing protocol (BGP) with you, it's your cheapest way to get link redundancy.

If this is possible under OS X, someone please correct me. I haven't done enough firewall hacking on OS X to know for sure, but a quick read of the ipfw man page didn't yield anything obvious.

Jason

--
Jason Healy    |    email@hidden    |   http://www.logn.net/



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macos-x-server mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/macos-x-server/email@hidden

This email sent to email@hidden
References: 
 >Multiple WAN interfaces (From: Dave Sheeran <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.