Source IPs (IP spoofing)
VUs connect from several of the runner's IPs, so a load balancer, a WAF or a per-client limit sees many clients instead of one. You add the IPs to the network interface; Spitfire only uses them. Each VU gets one IP in turn and keeps it for the whole run.
How to add IPs (Linux)
See the interface name:
ip -br addr showAdd the IPs (replace
eth0and10.0.0.x/24with your values):for i in $(seq 11 20); do sudo ip addr add 10.0.0.$i/24 dev eth0; doneKeep them after a reboot with NetworkManager (replace
"System eth0"with the name fromnmcli connection show):sudo nmcli connection modify "System eth0" +ipv4.addresses "10.0.0.11/24,10.0.0.12/24"On Ubuntu with netplan, add the IPs to the
addresseslist in/etc/netplan/*.yamland runsudo netplan apply.
How to add IPs (Windows)
In an administrator PowerShell, see the interface name:
Get-NetIPAddress -AddressFamily IPv4 | Format-Table InterfaceAlias, IPAddressAdd the IPs with
SkipAsSource(Windows does not use them for its own traffic; replace"Ethernet"with the name from step 1):11..20 | ForEach-Object { New-NetIPAddress -InterfaceAlias "Ethernet" -IPAddress "10.0.0.$_" -PrefixLength 24 -SkipAsSource $true }
How to use it in Docker
Put the runner on the server's network (Linux only; the choice is saved and kept on re-installs and updates):
~/spitfire/install.sh runner --runner-host-network onIf the runners are on the same server as the controller, write
dockerinstead ofrunner. For a new server, tick Server's network, for source IPs under Runners → Add runner → Docker and copy the command.
How to use it in Kubernetes
Label the node you added IPs to (replace
NODEwith the node name):kubectl label node NODE spitfire.io/source-ips=trueRun the runner pods on the node network, only on those nodes:
helm upgrade spitfire spitfire/spitfire -n spitfire --reuse-values --set runners.hostNetwork=true --set 'runners.nodeSelector.spitfire\.io/source-ips=true'
If you do not want the node network, give the pod a second interface with Multus + macvlan:
Create a
NetworkAttachmentDefinitionnamedspitfire-macvlan(type: macvlan,master: eth0, the IP range your network admin set aside).Attach the network to the runner pods:
helm upgrade spitfire spitfire/spitfire -n spitfire --reuse-values --set 'runners.podAnnotations.k8s\.v1\.cni\.cncf\.io/networks=spitfire-macvlan'
How to turn it on in a test
- On the Runners page, check that the runner shows "N source IPs" (new IPs show up within 30 s).
- Open the test and under Options → Source IPs pick All of the runner's IPs or IPs / CIDRs I pick.
- Save the test and start it.
- When the run ends, see each IP's VUs and connections on the Source IPs card.
How to check it works
From the runner server, send a request from one IP (replace
10.0.0.11andTARGET):curl --interface 10.0.0.11 -sS https://TARGET/Check that the target's access logs show different client IPs.
Details
| Topic | Info |
|---|---|
| Coverage | HTTP/1.1, HTTP/2, HTTP/3, WebSocket, SSE, GraphQL, MQTT, NATS, RabbitMQ: the VU's IP. SQL, Redis, MongoDB, Kafka, gRPC pools: connections are spread over the IPs in turn. Browser steps and external engines (k6, JMeter, Locust): not used |
| Missing IP | If an IP is on no runner, or a runner has no IP at all, the run does not start and the message says what is missing |
| Several runners | Each runner uses its own IPs |
| IPv4 / IPv6 | The IP of the target's family is used; with none of that family the operating system picks |
| Routing | IPs in the same subnet need nothing more. IPs from another subnet need a static route of that range to the runner, or connections time out |
| NAT | With NAT in between, the target sees every connection from the NAT's address |
| Cloud | On AWS/Azure/GCP, assign the IPs to the network card first (secondary private IPs), then add them to the operating system |
| Docker Desktop | On Mac/Windows the host network does not show the machine's IPs; use Linux |
Runners page shows 1 IP (172.17.x.x / pod IP) |
The runner is on the container/pod network; use the host network or Multus |