5

I want to share my internet connection and VPN connection but Tunnelblick/OpenVPN doesn’t play nice with internet connection sharing in OS X.

There was a suggestion on a workaround on how to route all traffic over VPN as per this post: Using (and sharing) a VPN connection on your Mac

The script is:

#!/bin/sh

natd -interface tun0
ipfw -f flush
ipfw add divert natd ip from any to any via tun0
ipfw add pass all from any to any
sysctl -w net.inet.ip.forwarding=1

I am not a UNIX expert – so I am just wondering if anyone can help me with the alternative for the above deprecated commands please?

0

I figured it and it seems sharing VPN connection in El Capitan is so much easier than it seems.

In Preferences -> Network click on + and add a VPN (PPTP or L2TP)

In Preferences -> Sharing

  1. Select (do not check yet), from the Share your connection from choose VPN connection previously created.
  2. From To computers using select Wi-Fi if you connect your computer to internet with Ethernet cable or select Ethernet if you connect your computer to internet with Wi-Fi.
  3. You can change Wi-Fi Options from bottom left button.
  4. Now Check the Internet Sharing from the left menu, and click Start
  5. Every time you connect the VPN a network will be created and lets you connect to it with any device and use the VPN on you Mac.
  • That feature has always been around -- even when the original article was written. That article is specifically about how to setup the internet sharing so that it routes traffic over a tunnelblick style VPN which unfortunately the built in GUI didn't do then, and still doesn't do in Capitan so this does not answer the question asked. – Jordan Feb 9 '16 at 16:06
  • I myself asked the question and the answer is OK with me. I wanted to share the VPN connection and it did do that. – Hadu Feb 11 '16 at 7:22

You must log in to answer this question.

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