I tried to understand the concept of iptables mangling part, but somehow failed to understand the IP header manipulative section.
For example: Below is the system scenario which I'm trying to correlate with the iptables.
We have an application which holds one IP (IP1 - pool 1) for all incoming and outgoing packets. Now, we need to define new interface IP against different POOL (IP2 - POOL2)for particular incoming/outgoing traffic need)
Need for an IPTABLE mangle :
We need IPtables to perform the below actions:
PREROUTING: if the packet destination is IP2, then we need a "iptable mangle rule" to modify the destination address from IP2 to IP1 and leave the packet (so that packet will go the application and IP2 address behaves as forward IP on different interface & pool than IP1).
Is it possible to add one rule to achieve the above action? , if yes, could someone provide hint or pointer to frame one ?
Thanks in Advance.