Forum Discussion
Tim_W_72292
Nimbostratus
Jun 16, 2008Changing an ip address in an RMI connection
Hi,
I am trying to change an ip address within an RMI connection, and I am not really too sure where to start. The data is as follows:
JRMI..KN..10.10.10.141.....
15.15.15.24...YP....w".................K........;.;>O.@.t..
The 15.15.15.24 address needs to be changed to 10.10.10.141.
Any ideas? The connection will always start the same way and is always from and to the same ip's (source and destination) but from different ports.
Thanks in advance.
- Tim_W_72292
Nimbostratus
Hi, - hoolio
Cirrostratus
Is the replacement in the TCP payload? If it is TCP and in the payload, you could also use a stream profile with STREAM::expression and STREAM::enable in CLIENT_ACCEPTED to perform the replacement in the payload. Check the STREAM::expression wiki page for an example (Click here). Collecting the payload and using regsub should work, but require more resources. - Tim_W_72292
Nimbostratus
Aaron, - hoolio
Cirrostratus
Tim, - Tim_W_72292
Nimbostratus
Aaron, - hoolio
Cirrostratus
Can you try this?when CLIENT_ACCEPTED { if {[IP::addr [IP::client_addr] equals 10.10.10.152]} { TCP::collect 30 } } when CLIENT_DATA { Do a regsub search and replace set bad_ip {15\.15\.15\.24} set replace_ip {10\.10\.10\.141} if { [regsub -all $bad_ip [TCP::payload] $replace_ip new_payload ] > 0} { TCP::payload replace 0 [TCP::payload length] $new_payload TCP::release } }
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects