Using MacBook Pro (Retina, 13-inch, Mid 2014) with macOS Sierra 10.12.5 (16F73), I have a VPN connection through Pulse Secure on my WiFi, and I would like to share it with my mobile device, so I got a D-Link DWA-131 Nano USB WiFi adapter, and tried to connect through the new adapter to VPN, whilst sharing the connection through AirPort WiFi using Internet Sharing.
The sharing works, internet works, but VPN is not shared, only internet connection, so I tried to share my VPN using
pfctl but with no luck, I've done it before through Ethernet, but I'm not able to do it through WiFi.
Here's what I do:
# sysctl -w net.inet.ip.forwarding=1 # sysctl -w net.inet.ip.fw.enable=1 (this generates sysctl: unknown oid 'net.inet.ip.fw.enable', no idea what is needed) # pfctl -d # pfctl -f nat-rules -e
nat-rules file contains:
nat on utun1 from en0:network to any -> (utun1)
This is the only rule, it worked before when I was forwarding VPN from Ethernet to WiFi (different BSD device names of course).
Have you tried such thing before? It seems that the main problem is around creating a WiFi network without Internet Sharing, which doesn't seem to be possible 😔