Skip to content

Instantly share code, notes, and snippets.

View paulormart's full-sized avatar
🪁

Paulo Martins paulormart

🪁
View GitHub Profile
@paulormart
paulormart / forwarding-example.md
Created September 21, 2016 21:12 — forked from f1sherman/forwarding-example.md
Port Forwarding Example in OS X El Capitan

Add the following to /etc/pf.anchors/myname:

rdr pass on lo0 inet proto tcp from any to any port 80 -> 127.0.0.1 port 4000
rdr pass on lo0 inet proto tcp from any to any port 443 -> 127.0.0.1 port 4001

Add the following to /etc/pf-myname.conf:

rdr-anchor "forwarding"
load anchor "forwarding" from "/etc/pf.anchors/myname"