Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am using Ubuntu Server 12.04. My IP is I want to route the HTTP traffic generated locally from my system destined to a particular URL (say x.x.x.x) to pass through proxy server. My proxy server is I added following rule in iptables

sudo iptables -t nat -A OUTPUT -p tcp -d x.x.x.x --dport 80 -j DNAT --to

However, this rule does not seem to work for me. I captured packet in wireshark and I saw that packet is still going to x.x.x.x

I am not very much familiar with iptables, so please try to be specific. Thanks in advance

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.