I use the following rules to connect to my nginx server on a vagrant machine:
sudo ipfw add 100 fwd 127.0.0.1,8080 tcp from any to me 80
sudo ipfw add 100 fwd 127.0.0.1,8090 tcp from any to me 443
after installing little snitch, it seems to have made ipfw useless and i can't figure out how to apply a forward rule to little snitch?
Best Answer
Since ipfw is also removed in Yosemite the solution is to use pf
create a file in /etc/pf.anchors/
e.g. com.myapp
NOTE: Add a trailing line break. Otherwise pf will say you have a syntax error.
edit /etc/pf.conf add right after
rdr-anchor "com.apple/*"
:and after
load anchor "com.apple" from "/etc/pf.anchors/com.apple"
:NOTE: Add a trailing line break. Otherwise pf will say you have a syntax error.
Next, reload the rules into pf by running
sudo pfctl -f /etc/pf.conf
Finally, enable pf by running
sudo pfctl -e
Source: https://github.com/basecamp/pow/issues/452