Localization and geo-specific testing by simulating traffic from different global locations
Last validated:
Featured reference:
Exit nodes (route all traffic)
Route all internet traffic through a specific device on your network.
Testing localization and geo-specific behavior typically requires deploying infrastructure in multiple regions or relying on third-party proxy services. Both approaches add cost and complexity, and proxy-based testing often produces unreliable results because commercial proxies share IP ranges that many services flag or block.
Tailscale exit nodes let you route traffic from your test machine through a device in any geographic location on your tailnet. By deploying exit nodes in the regions you need to test, you can simulate real user traffic from those locations. Combined with Siege, a command-line load testing tool, you can generate realistic traffic patterns to validate localization, geo-routing, and region-specific content delivery.
Set up exit nodes in target regions
Configure Linux servers in at least two geographic regions (for example, US East and EU West) as exit nodes so your test machine can route traffic through them. Each server needs Tailscale installed and running. Follow the Install Tailscale on Linux instructions if needed.
-
On each regional server, enable IP forwarding:
echo 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf echo 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf sudo sysctl -p /etc/sysctl.d/99-tailscale.conf -
Advertise each server as an exit node:
sudo tailscale set --advertise-exit-node -
Approve each exit node in the admin console. This requires Admin privileges.
- Open the Machines page.
- Find the regional server, open the ... menu, and select Edit route settings.
- Enable Use as exit node and select Save.
-
Verify the exit nodes are available from your test machine:
tailscale exit-node listYou'll find your regional servers in the output.
Name your machines descriptively (for example, exit-us-east and exit-eu-west) so they are easy to identify when switching between regions.
Grant access to exit nodes
-
Add a grant to your tailnet policy file that lets your test machines use the exit nodes. Tag your exit node servers with
tag:exit-nodeand grant your test group access:"tagOwners": { "tag:exit-node": ["group:qa"] }, "grants": [ { "src": ["group:qa"], "dst": ["tag:exit-node"], "app": { "tailscale.com/cap/node-exit": [{}] } } ]
You can use the visual policy editor to manage your tailnet policy file. Refer to the visual editor reference for guidance on using the visual editor.
-
Assign the tag to each exit node server:
sudo tailscale set --advertise-tags=tag:exit-node
Install Siege on your test machine
Install Siege on the machine you will use to generate test traffic.
Verify the installation:
siege --version
Run geo-specific load tests with Siege
With your traffic routed through a regional exit node and Siege installed, generate load against your application to validate its localization behavior.
-
On your test machine, select the exit node for the region you want to test. For example, to route traffic through your US East server:
sudo tailscale set --exit-node=exit-us-east -
Confirm that your traffic is routing through the exit node by checking your public IP address:
curl -s https://ifconfig.meThe output displays the public IP address of the exit node server, not your local machine.
-
Run a basic load test through the US East exit node:
sudo tailscale set --exit-node=exit-us-east siege -c 10 -r 50 -H "Accept-Language: en-US" https://your-app.example.comThis sends 50 rounds of requests with 10 concurrent users, each including the
en-USlanguage header. Your application will serve US-localized content based on the geographic origin of the traffic. -
To verify that your application returns region-specific content, use Siege in verbose mode and inspect the responses:
sudo tailscale set --exit-node=exit-eu-west siege -c 1 -r 1 -v -H "Accept-Language: de-DE" https://your-app.example.comCheck the response headers and content to confirm the application returns the expected localized version.
-
Once you've finished testing, turn off the exit node on your test machine so traffic routes normally:
sudo tailscale set --exit-node= -
Verify your traffic is no longer routed through the exit node:
curl -s https://ifconfig.meThe output displays your local machine's public IP address.
Test multiple regions sequentially
Create a script that switches exit nodes and runs Siege against each region:
#!/bin/bash
REGIONS=("exit-us-east" "exit-eu-west")
LANGUAGES=("en-US" "de-DE")
TARGET="https://your-app.example.com"
for i in "${!REGIONS[@]}"; do
echo "Testing region: ${REGIONS[$i]} with language: ${LANGUAGES[$i]}"
sudo tailscale set --exit-node="${REGIONS[$i]}"
sleep 5
siege -c 10 -r 50 \
-H "Accept-Language: ${LANGUAGES[$i]}" \
--log="/tmp/siege-${REGIONS[$i]}.log" \
"$TARGET"
echo "Completed: ${REGIONS[$i]}"
done
sudo tailscale set --exit-node=
echo "All region tests complete."
The script cycles through regions, sets the exit node, runs Siege using the language for that region, and then turns off the exit node at the end.