Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
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

I found the solution:

sudo ifconfig lo0 alias
sudo ipfw add fwd,9790 tcp from me to 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

Your Answer


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.