My ethernet connects to the LAN, my airport connects to a different network (it's another mac sharing a VPN connection). I want all apps except the iPhone Simulator to connect via the LAN.

Is this possible?


The main way you would have to go about this is probably using ipfw command line, although I really don't have much experience with it. You could make custom routing rules to do what you need to do.

Some other options:

  • If the app was trying to use something specificially on that network, it should route that way. As in, if you local network is 192.168.x.x, and your remote is 10.0.x.x, if you try to access something on 10.0.x.x, it should route that way.

  • Another idea that comes to mind (Which really just jumps around the problem) would be to have an applescript that changed the order of interfaces when you needed it. Your mac should be using whatever is at the top of the list as its primary network in preferences. If you drag airport up, it would use that as the main network. Maybe scripting this would be easy to do and a quick change when you need to test something in simulator.

  • 1
    No, ipfw doesn’t act “per application” but if he can find the ports he’s using, he needs to forward those through the right subnet… it’s possible but probably complicated. Oct 29 '10 at 5:08

You might want to try Little Snitch.

I'm not sure it has this feature since I haven't used it in a while, but it's worth the try.

  • 2
    ïc I don't think Little Snitch do what he wants! at least I use it just for control my internet connection(allow app to connect or not)
    – Am1rr3zA
    Oct 28 '10 at 17:27
  • 1
    ïc Indeed Little Snitch has nothing to do with that, it’s an outbound firewall controller. Oct 29 '10 at 5:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .