Skip to content

Instantly share code, notes, and snippets.

View sohgoh's full-sized avatar

Satoshi Ohgoh sohgoh

  • NTT Resonant Technology Inc.
View GitHub Profile
@sohgoh
sohgoh / forwarding-example.md
Last active December 22, 2015 06:59 — forked from f1sherman/forwarding-example.md
Port Forwarding Example in OS X El Capitan

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

// 以前は port {80 8080} -> 127.0.0.1 port 8080 みたいな書き方が出来たけどEl Capitanから無視される?ようなので注意
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"