Forum Discussion
Nat_Thirasuttakorn
Jun 17, 2008Employee
miguel_alfaro,
To change destination IP, you need to enable address translation in virtual configuration, assign pool or use node command in iRule. (I believe it is what hoolio and mgabaldon point out earlier.)
let say you use node command.
on sender side
when CLIENT_ACCEPTED {
TCP::collect
}
when CLIENT_DATA {
set ww [scan [IP::local_addr] "%d.%d.%d.%d"]
set xx [binary format c4 $ww]
TCP::payload replace 0 0 $xx
node 172.16.49.70
TCP::release
}
on receiver LTM
when CLIENT_ACCEPTED {
TCP::colllect
}
when CLIENT_DATA {
binary scan [TCP::payload] a4 xx
set first_ip [IP::addr $xx mask 255.255.255.255]
node $first_ip
TCP::release
}