ipfw to redirect traffic from port 80 and 443 to 8080
- by user1048138
-A PREROUTING -s 10.0.10.0/24 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080
-A PREROUTING -s 10.0.10.0/24 -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 8080
-A POSTROUTING -s 10.0.10.0/24 -o eth0 -j MASQUERADE
The above code is what I have used on linux to forward my ports to 8080, how can I do the same on a mac?
I have tried
test_machine:~ root# ipfw show
00666 0 0 fwd 127.0.0.1,8080 tcp from any to me dst-port 80
and its not working! any suggestions?