ipfw to redirect traffic from port 80 and 443 to 8080

Posted by user1048138 on Super User See other posts from Super User or by user1048138
Published on 2012-09-12T01:08:43Z Indexed on 2012/09/12 3:40 UTC
Read the original article Hit count: 311

Filed under:
|
|
|
|
-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?

© Super User or respective owner

Related posts about linux

Related posts about mac