linux – SNAT and DNAT iptables on the same incoming packet

Is it possible to SNAT and DNAT on the same incoming packet?

iptables -t nat -A PREROUTING -d  --dport  -j SNAT --to 
iptables -t nat -A PREROUTING -d  --dport  -J DNAT --to 

Do the above rules cling and dnat the same package? if not, what is the way to achieve it. An example would be very useful. Thank you!

linux – Nginx load balancing as gateway (without SNAT)

I'm trying to configure Nginx as a backup of last resort for F5-BIG-IP and I do not know if it's possible to configure it for it to behave the same way as F5 in terms of traffic management?

F5 is currently deployed as a gateway in L3 like this (all addresses start here by 192.168.0.):

advanced router .13 / 30 --- .14 / 30 F5 .10 / 30 --- .9 / 30 basic router --- other networks

The edge router runs the DNAT at various addresses (which were previously a single server), such as or They come from different networks. F5 works as a gateway and balances traffic with such destination addresses (without SNAT)

So my question is, how can I deploy Nginx this way? I know that I can use iptables and IP Forwarding at the Linux level to act as a gateway and provide routing functionality, but I do not know how to allow Nginx to balance the connection load with the following destination: this is not the IP address of such a Linux machine itself (that is the actual address of one of the pool members) and without performing SNAT.

I thought about using iptables with REORIENTING but I do not know if Nginx supports such a deployment.