I have an application (mirth) on a server (10.2.2.200) that on port 6661 is receiving an HL7 feed from an egate server from 10.0.1.234 port 56789. For each message it receives/processes, its generating back an HL7 ACK message to 10.0.1.234 port 56789. The egate server (which I don't control) isn't getting the ACK messages though, as its expecting to receive them at 10.1.1.111 port 6661.
Would it be possible to setup iptables (on my mirth server -- that is 10.0.2.200) to edit the ACK packets generated by mirth that were originally supposed to go to 10.0.1.234 port 56789 and instead send them to 10.1.1.111 port 6661?
I'm reading up on NAT/iptables ( http://www.karlrupp.net/en/computer/nat_tutorial ), but I'm not sure if its possible at this point and any help would be much appreciated.
Summary of fake IPs:
- Mirth : 10.2.2.200 (listening to port 6661)
- Egate sender: 10.0.1.234 (listening to port 56789)
- Egate wants listening for ACKs: 10.1.1.111 port 6661