Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I would like to be able to use my home server (2012 Mac Mini) as a OpenVPN client with two network interfaces. My plan is to connect a small switch with an Apple TV and Roku to one thunderbolt ethernet port and then connect the internal ethernet port to my wider network for internet access, sort of like this;

Apple TV 3>>>
              dumb switch >>> eth1 >>> Mac Mini > OpenVPN > eth0 >>> fibre router
Roku 2 XS >>>

Any ideas what I would need to do to make this work?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

Mostly, you can just overload the one ethernet hardware port with two or more IP settings. As long as your switch can handle things, this works the simplest.

Or you could drop an thunderbolt to ethernet adapter on the back of the Mac Mini and have two hardware interfaces to let the Mac Mini sit between the two networks and route as needed. You would run OpenVPN on the adapter en0 which connects to fiber.

All of this is controllable over the normal system preferences for networking but I've been able to accomplish all of what you describe without needing the unix command line. Just drag the default route interface to the top of the service order listing and you should be good to go.

share|improve this answer
    
Really? So as long as en0 is above en1, when I connect to the VPN it'll choose en0 as the default? I didn't know you could do that through sys prefs. Amazing, thanks very much! –  sgtbeano Feb 24 '13 at 15:56
    
Yes - and you can use netstat -nr or the network utility to examine the routing table. But, when you order the interfaces, traffic goes to the default route interface unless there is a specific routing rule for a smaller subnetwork. Choosing your networks appropriately will let you do exactly what you choose. –  bmike Feb 24 '13 at 16:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.