Created
October 22, 2014 07:16
-
-
Save varmais/ccbc236242960239f5de to your computer and use it in GitHub Desktop.
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
# Port forward 80 to 8080 in OS X Yosemite | |
# Add this line to /etc/pf.anchors/<anchor name> | |
rdr pass on lo0 inet proto tcp from any to 127.0.0.1 port 80 -> 127.0.0.1 port 8080 | |
# Save and test if it has any errors | |
$ sudo pfctl -vnf /etc/pf.anchors/<anchor name> | |
# Add these lines to /etc/pf.conf | |
rdr-anchor "forwarding" | |
load anchor "forwarding" from "/etc/pf.anchors/<anchor name>" | |
# Save and load the config | |
$ sudo pfctl -ef /etc/pf.anchors/<anchor name> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment