Related Stackoverflow Question:
https://superuser.com/a/206826/55267
Related answer:
https://superuser.com/a/206826/55267
# setup
sudo touch /etc/ppp/ip-up
sudo vim /etc/ppp/ip-up # fill the script
sudo chmod +x /etc/ppp/ip-up
# tail the logs
sudo tail -f /var/log/ip-up.log
Tested on MacOS 10.13
and didn't work for me. Script doesn't get called.