Localization and geo-specific testing by simulating traffic from different global locations
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 in 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 of the admin console.
- Find the regional server, select the
button, then select Edit route settings.
- Select Use as exit node, then 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 the following grant and tag owner definition to your tailnet policy file to let members of
group:qause exit nodes taggedtag:eu-exit-nodefor geo-specific testing.tagOwners: Defines who can assign a tag to devices. This example lets members ofgroup:qaassigntag:eu-exit-nodeto the exit nodes they want to use for testing.src: Specifies who the grant applies to. This example applies the grant to members ofgroup:qa.dst: Specifies what the source can access. Theautogroup:internetdestination grants access to internet traffic, which a device can only reach through an exit node.via: Restricts which exit nodes the source can route traffic through. This example limitsgroup:qato exit nodes taggedtag:eu-exit-node, so group members can't use other exit nodes in your tailnet. For more information, refer tovia.ip: Specifies the protocols and ports permitted by the grant. The*wildcard permits all protocols and ports.
"tagOwners": { "tag:eu-exit-node": ["group:qa"] }, "grants": [ { "src": ["group:qa"], "dst": ["autogroup:internet"], "via": ["tag:eu-exit-node"], "ip": ["*"] } ]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:eu-exit-node
Install Siege on your test machine
Install Siege on the machine you will use to generate test traffic.
Install Siege with your package manager. On Ubuntu and Debian systems, use apt:
sudo apt install siege
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, request a page with
curland inspect the response:sudo tailscale set --exit-node=exit-eu-west curl -s -D - -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.