Deprecated “natd” and “ipfw” in El Capitan 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?
I figured it and it seems sharing VPN connection in El Capitan is so much easier than it seems.

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

In Preferences -&gt; Sharing 


Select (do not check yet), from the Share your connection from choose VPN connection previously created.
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.
You can change Wi-Fi Options from bottom left button.
Now Check the Internet Sharing from the left menu, and click Start 
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.