iRule to change Destination IP
I am using clone pool to duplicate the syslog packets to syslog-ng. I see packets been duplicated on F5 and forwarded to host on clone pool by wiresharking on syslog-ng and also the utilisation counter on F5. This is the traffic flow:
1. Client send syslog messages to F5 VIP (18.104.22.168);
2. F5 receives the packet and sends to standard load balancing pool (22.214.171.124);
3. At same time, packet is duplicated and send to clone pool member syslog-ng (126.96.36.199);
4. The duplicated packet sent to syslog-ng doesn't change the packet destination IP and still preserves as 188.8.131.52 F5 VIP. When packet is received on 184.108.40.206 the destination MAC is of 220.127.116.11, but destination IP is 18.104.22.168. I can confirm this via wireshark and sees on physical interface, but IP layer checking discard the packet, because of mismatch of MAC and IP.
I confirm this by assiging the secondary IP on syslog-ng as 22.214.171.124 and I start receiving the packet...just a nasty trick. The clone pool is doing it's job by not changing the destination IP as it was designed for IDS.
I am thinking to write an iRule to change the destination IP to syslog-ng (126.96.36.199) from 188.8.131.52. when packet is duplicated and before sent on wire.
I am not a good programmer as someone please help in writing this iRule.
Thanks in advance.