Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I want when on my local machine redirect from 192.168.64.88 port 80 to localhost port 9790. How can I do it with ipfw rule?

share|improve this question
1  
Poor man's solution would be to use http://localhost:9790 in the browser. I assume this is not an option for you? –  patrix Feb 4 '13 at 12:56
    
It is not an option –  Yoldar-Zi Feb 4 '13 at 12:57
add comment

1 Answer 1

I found the solution:

sudo ifconfig lo0 192.168.64.88 alias
sudo ipfw add fwd 127.0.0.1,9790 tcp from me to 192.168.64.88 dst-port 80

After a restart you have to run this commands again.

share|improve this answer
    
You can define a launchd entry to automatically execute these commands on a reboot. –  patrix Feb 13 '13 at 20:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.