I want to forward requests from 192.168.99.100:80
to 127.0.0.1:8000
. This is how I'd do it in linux using iptables
:
iptables -t nat -A OUTPUT -p tcp --dport 80 -d 192.168.99.100 -j DNAT --to-destination 127.0.0.1:8000
How do I do the same thing in MacOS X? I tried out a combination of ipfw
commands without much success:
ipfw add fwd 127.0.0.1,8000 tcp from any to 192.168.99.100 80
(Success for me is pointing a browser at http://192.168.99.100
and getting a response back from a development server that I have running on localhost:8000
)