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

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 domain.com 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.