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.

  • Is it possible that your reply returns to your client by different path (omitting your DNAT box)? It is not clear form me from your explanation. Where on your network is attached? – Tomek Jun 13 '19 at 11:16
  • Hello Tomek. No, the answer always came back through the Linux machine. This iptables/router is the default gateway for – Kalil Jun 13 '19 at 11:28
  • It is default gateway for OUTGOING packets. What about incoming? And again - where is attached? – Tomek Jun 13 '19 at 11:32
  • Yes, this gateway is for OUTGOING. The is on your DMZ. There are more two gateways. One for the and other for But the return path is knowing for both and always pass through this Linux. – Kalil Jun 13 '19 at 11:43
  • Provide the outputs of iptables-save -t nat and ip -4 r ls table all, and ip -4 ru ls commands from NAT box, please. – Anton Danilov Jun 13 '19 at 11:58

After Tomek comment I was looking for better this netowrk, I'm knew in this company, and figure out that another router were been used as reponse path. Becouse of this the client network was receiving a different IP.

Thanks for all help.

Best regards

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.