Skip to content

Instantly share code, notes, and snippets.

@augustocdias
Last active September 17, 2019 21:40
Show Gist options
  • Save augustocdias/ff4941ff12634a192fe826f7ba9d3586 to your computer and use it in GitHub Desktop.
Save augustocdias/ff4941ff12634a192fe826f7ba9d3586 to your computer and use it in GitHub Desktop.
Port forward Mac OS

Port Forwarding on Mac OS

In order to use the 80 or 443 ports on Mac OS without the need to start web server with root:

echo "rdr pass inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080" | sudo pfctl -ef -

echo "rdr pass inet proto tcp from any to any port 443 -> 127.0.0.1 port 8443" | sudo pfctl -ef -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment