DNAT redirection works but returns with the redirect IP

by Kalil   Last Updated June 13, 2019 11:00 AM

I'm doing a test that my clients, network, when try to connect to been redirected to This part is working, but my problem is on the answer. The answers is arriving is and what I want is the firewall/router change back to before to give back to the client. This is what I did on my firewall/router:

iptables -t nat -A PREROUTING -i eth1 -s -d -j DNAT --to

There is just this line, nothing more.

Here my netowrk: |-> <-|,|-><-||-> Servers

I already tried

iptables -t nat -A POSTROUTING -o eth0 -d -j RETURN


iptables -t nat -A PREROUTING -i eth1 -s -d -j DNAT --to

but nothing works.

Should I load statefull modules?

Best regars.

Tags : iptables dnat

Related Questions

Updated April 23, 2015 21:00 PM

Updated August 01, 2015 14:00 PM

Updated February 26, 2017 06:00 AM

Updated May 03, 2017 03:00 AM

Updated March 20, 2019 17:00 PM