I have a server on AWS with a floating (secondary) IP. During integrations with a partner I provide my secondary IP to be whitelisted and define a POSTROUTING rule to SNAT my IP to the secondary IP to reach to destination such as
sudo iptables -t nat -A POSTROUTING -d partnersip/32 -s myprivateip -j SNAT --to-source secondaryip
But now I've come to a scenario where my partner is also using NAT and I would like to know if it's possible to NAT my secondary IP to the partners NAT IP in the same server after defining my POSTROUTING rules to nat to my secondary IP. something like
sudo iptables -t nat -A POSTROUTING -d partnersip/32 -s secondaryip -j SNAT --to-source partnersnat.ip .