Running load tests on IP whitelisted applications can be difficult when load agents get random IP addresses from AWS. This can be particularly difficult when your application is not running in AWS. One solution to this problem is to use NAT Gateways with Elastic IPs. The Elastic IP can be whitelisted with your application allowing the load agents to reach your private targets.

Step 1: Set up VPC subnets (if needed)

  1. Go to the AWS VPC console (https://console.aws.amazon.com/vpc/home).
  2. If you do not have a VPC yet, use the “Create VPC” button to create a VPC. (If you don’t have a specific IPv4 subnet you want to use, 10.0.0.0/16 would be a good choice).
  3. Go to the Subnets tab.
  4. Click “Create Subnet” and follow the steps to set up a subnet where your load agents will run. This will be your private subnet.
  5. Repeat this to create a public subnet. Be sure this is set up to use a route table linked to an internet gateway (you can set the route table after creating the route table by selecting the subnet, then using the Route Table tab at the bottom of the page). If you do not have an Internet gateway for your VPC, you can create one at https://console.aws.amazon.com/vpc/home?region=us-east-1#igws:sort=internetGatewayId. If you do not have a route table linked to the internet gateway, you can create one at https://console.aws.amazon.com/vpc/home?region=us-east-1#RouteTables:sort=routeTableId.
    Setting the Route Table

Step 2: Set up your NAT Gateway

  1. Go to the AWS VPC console (https://console.aws.amazon.com/vpc/home).
  2. Go to the NAT Gateways tab.
  3. Click “Create NAT Gateway”.
  4. Select the public subnet from Step 1.
  5. Select an existing Elastic IP or create a new one.

Step 3: Set up a Route Table

  1. Go to the AWS VPC console (https://console.aws.amazon.com/vpc/home).
  2. Go to the Route Tables tab.
  3. Click “Create route table” and create a new route table.
  4. Once created, click “Edit routes” under the bottom “Routes” tab and add 0.0.0.0/0 with a target of the new NAT Gateway.
  5. Under the “Subnet Associations” bottom tab, click “Edit subnet associations” and associate the private subnet from Step 1.

Step 4: Test your setup

  1. Go to https://www.redline13.com/StartTest to start running load tests on IP whitelisted applications.
  2. When setting up load agents under “Advanced Cloud Options”, be sure to pick the private subnet from Step 1 and a Security Group with proper outbound rules.
  3. If set up correctly, your test should run and be able to reach your whitelisted servers.

You can try for yourself and quickly run your own test on RedLine13.