OpenVPN sharing on MacOS Catalina
Hi, i just try share my internet connection from ethernet using wifi hotspot with OpenVPN client(TunnelBlick). I have utun2 - openvpn interface, en1 - wifi ap, en0 - ethernet
I use this sh:
#!/bin/sh
sysctl -w net.inet.ip.forwarding=1
sudo pfctl -d
sudo pfctl -F all
pfctl -f ./nat-rules -e
and nat-rulse file:
First try
nat on en1 from utun2:network to any -> (en1)
Second try
nat on en1 from ! (en1) to any -> (en1:0)
rdr pass on utun2 inet proto { tcp udp } from 10.8.0.0/24 to en1 -> 10.8.0.2
Third try:
nat on $ext_in from $lan to any -> ($ext_in)
nat on $vpn_in from $lan to any -> ($vpn_in)
with all enX to ext_in and all utunX in vpn_in
But i don't get internet connection on my phone where i connect to MacBook. I don't understand how to create iptables in MacOS. Who can help? Thanks
MacBook, macOS 10.15