Forum Discussion
iRule to randomly change source IP
Hi Pitor,
I understand that you had a question back in 2015 about simulating clients from different geolocations using a limited pool of private IP addresses. Although your question was from a few years ago, I wanted to provide an updated answer for anyone facing a similar challenge in 2023.
If you're looking to simulate clients from different geolocations using a limited pool of private IP addresses, you can consider using a random IP address generator. I recommend checking out https://randomtools.io/random-ipaddress-generator/ for a ready-to-use tool that can generate country-located IP addresses.
To achieve the desired flow:
- When a packet arrives with a private IP, you can use the random IP generator from the provided link to generate a new IP address representing a different geolocation.
- Replace the original private IP with the generated IP before forwarding the request to the server.
- If possible, consider modifying the response packet's destination IP back to the original source IP before sending it back to the client.
Please keep in mind that modifying IP addresses in transit may have specific limitations or dependencies on the network infrastructure and client capabilities.
Recent Discussions
Related Content
* 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