Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to set up a local http proxy for testing and stubbing apps that make external api calls over http.

I'm not sure the best way to do this with ipfw, I want to run my proxy as a particular user, then redirect all http traffic to this proxy, but I need to allow all http trafic from this user, what are the particular ipfw rules for this?

I am using OS X.

share|improve this question
    
Please update with OS version. –  kubanczyk Feb 7 '12 at 15:37
add comment

1 Answer

ipfw add 666 fwd 127.0.0.1,80 tcp from me to any 80 not uid user_proxy

This should theoretically forward locally generated traffic directed at some port 80 to localhost:80, where the proxy is running under the user_proxy user. I have no idea why this doesn't work. On my system the machine just dies after I do it (OS X 10.8). Did you manage to solve your problem?

share|improve this answer
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.