Skip to content

Instantly share code, notes, and snippets.

@Toshakins
Last active May 4, 2017 16:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Toshakins/865d15985c38478d23f15aa768be0129 to your computer and use it in GitHub Desktop.
Save Toshakins/865d15985c38478d23f15aa768be0129 to your computer and use it in GitHub Desktop.
Redirect ports on OS X El Capitan via embedded firewall
#!/bin/bash
echo "
rdr pass inet proto tcp from any to any port 443 -> 127.0.0.1 port 4443
" | sudo pfctl -ef -
#!/bin/bash
sudo ssh -L localhost:80:localhost:8888 -fN -i /Users/antono/virt/.vagrant/machines/default/virtualbox/private_key -p 2222 vagrant@localhost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment