Created
June 19, 2015 16:12
-
-
Save Chrisell/06e0c2427e28f67b007e to your computer and use it in GitHub Desktop.
Port forwarding 8080 -> 80 on Yosemite
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I alias this to enable_pf since it's reset on reboot | |
$ sudo pfctl -ef /etc/pf.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/pf.conf | |
scrub-anchor "com.apple/*" | |
nat-anchor "com.apple/*" | |
rdr-anchor "com.apple/*" | |
rdr-anchor "forwarding" | |
dummynet-anchor "com.apple/*" | |
anchor "com.apple/*" | |
load anchor "com.apple" from "/etc/pf.anchors/com.apple" | |
load anchor "forwarding" from "/etc/pf.anchors/rails" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# etc/pf.anchors/rails | |
rdr pass on lo0 inet proto tcp from any to 127.0.0.1 port = 80 -> 127.0.0.1 port 8080 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment