Forum Discussion
dragonflymr
Mar 10, 2015Cirrostratus
iRule to randomly change source IP
Hi,
Still to new to iRules so I have problem figuring out rule that will simulate clients coming from different geolocations when traffic is generated from limited pool of private ip addresses.
...
Mar 10, 2015
And maybe you find these useful as well:
when CLIENT_ACCEPTED {
snat 10.10.10.[expr ( [getfield [IP::client_addr] "." 4] % 32 ) + 1]
snat 10.10.[getfield [IP::client_addr] "." 3].[getfield [IP::client_addr] "." 4]
}
The following one simulates varying clients by inserting a randomized X-Forwarded-For and uses another internal virtual server for processing:
when HTTP_REQUEST {
snat automap
HTTP::header insert X-Forwarded-For [expr int(rand()*128) + 32].[expr int(rand()*254)].[expr int(rand()*254)].[expr int(rand()*254)]
virtual vs_internal
}
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