Server Fault is a question and answer site for system and network administrators. 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'm trying to workaround a broken application which insists on connecting to the private address (and thus unreachable) of a server, instead of connecting to the public address (even if the relevant port is open). Changing the application is not an option.

I'm trying to add iptables rules on the client(s) to change the destination ip for the packets going to to go to instead. DNAT isn't working since is not an IP on any of my client interfaces.

Can anyone point me to the relevant documentation that allows me to use MANGLE to change destination IPs?

share|improve this question
up vote 2 down vote accepted

Never mind this question - seems I was doing something wrong. It works with DNAT: iptables -t nat -A OUTPUT -p tcp -d -j DNAT --to-destination

share|improve this answer
Thanks so much! It's still dark matter for me!!! – tmow Jan 24 '13 at 13:02

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.