Skip to content

Instantly share code, notes, and snippets.

View DavydLiu's full-sized avatar

David Liu DavydLiu

View GitHub Profile
@DavydLiu
DavydLiu / Mac-Port-Forwarding-OS-X.md
Last active January 17, 2019 16:13
Mac Port forwarding on OS X Yosemite 10.10 and above

##1. Create the anchor file:

sodu vim /etc/pf.anchors/com.liuxingruo

Inside the anchor file, enter:

rdr pass on lo0 inet proto tcp from any to self port 80 -> 127.0.0.1 port 9191
rdr pass on en0 inet proto tcp from any to any port 80 -> 127.0.0.1 port 9191
rdr pass on en1 inet proto tcp from any to any port 80 -> 127.0.0.1 port 9191