Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 to implement a proxy that records and replays requests made to specific hosts. So that I can stub out external service requests when testing an application.

What is the best way to do this? I have tried modifying the hosts file so that goes to my localhost, but then this prevents my proxy from then making requests to that domain.

Is there some combination of /etc/hosts change and iptables that I can use to achieve this?

share|improve this question

Your Answer


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

Browse other questions tagged or ask your own question.