Use multiple static IPs with one WireGuard tunnel

A Multi-IP tunnel lets you use several of your static IPs on one computer or server, with just one WireGuard connection. Each IP keeps its own public address, ports, speed, and usage. You can choose which IP each application uses.

How it works

Each public IP gets its own private tunnel address, such as 10.77.1.5. You'll find these addresses listed alongside your public IPs on the tunnel page.

  • Outgoing connections: To send traffic through a particular public IP, tell your application to use its tunnel address. Without this setting, your operating system chooses the address. Traffic isn't automatically rotated or spread across your IPs.
  • Incoming connections: Everything works as usual. Open the ports you need for each IP on the Ports tab. Incoming traffic automatically reaches the corresponding tunnel address, and replies go out through the same public IP.

Before you start: Multi-IP tunnels are for using several IPs on one device. If you want to use a single IP on several devices, use + Add device on that IP instead.

To join the same tunnel, IPs must be on the same server, use standard WireGuard with generated keys, and have no additional devices. IPs using AmneziaWG or your own key can't join.

Create a Multi-IP tunnel

  1. Choose your IPs

    In your dashboard, go to My IPs → View IPs and click + Create Multi-IP tunnel.

    Select the IPs you want to combine, optionally give your tunnel a name, and click Create tunnel. If an IP isn't eligible, you'll see why.

  2. Install your config

    On your new tunnel page, find Download & Install and click Download Config. You can also copy the config, or use the QR code where supported.

    Import the file into WireGuard and activate the tunnel. That's it — all your selected IPs are now available through one connection.

    The tunnel config replaces your previous configs for those IPs, so disable or remove them.

  3. Test your IPs

    To confirm everything is working, run this command on Linux or Mac, replacing 10.77.1.5 with one of your tunnel addresses:

    curl --interface 10.77.1.5 https://getastatic.com/api/tools/ip

    The result should show the public IP associated with that tunnel address.

    Repeat for your other IPs. If you get curl error 45, check that WireGuard is connected and that the address is included in your installed config.

Choose which IP an app uses

All your IPs are available through the same tunnel, but each application needs to specify which one to use.

Simply configure the application to use the private tunnel address of your chosen IP. Depending on the application, this setting might be called bind address, source address, local address, or outgoing interface.

For example, if the IP you want has tunnel address 10.77.1.5, configure your app to use 10.77.1.5. Its outgoing connections will use the corresponding public IP.

Here are a few examples using 10.77.1.5. Replace it with your own tunnel address. Each example shows which public IP the connection uses.

curl and wget

curl --interface 10.77.1.5 https://getastatic.com/api/tools/ip
wget -qO- --bind-address=10.77.1.5 https://getastatic.com/api/tools/ip

Python

import http.client, json

conn = http.client.HTTPSConnection(
    "getastatic.com", source_address=("10.77.1.5", 0)
)
conn.request("GET", "/api/tools/ip")
print(json.load(conn.getresponse())["ip"])

Node.js

const https = require("https");

https.get(
  "https://getastatic.com/api/tools/ip",
  { localAddress: "10.77.1.5" },
  (res) => res.pipe(process.stdout),
);

Windows: host websites on different IPs (IIS)

You can host multiple websites on the same Windows server, each using a different public IP.

In IIS Manager, select your website and click Bindings…. Select the binding, click Edit…, set IP address to the tunnel address you want that website to use, and click OK.

Repeat for each website, choosing a different tunnel address.

Open the website ports (usually 80 and 443) for each of those IPs on the Ports tab. Each website will then respond on its assigned public IP.

Managing your tunnel

  • Add more IPs: Click + Add existing IPs on the tunnel page. Your existing config will keep working, but you'll need to download and install the updated config to use the new IPs.
  • Remove an IP: Click the trash icon beside it. The IP returns to its own separate config. Download the updated tunnel config to remove its address from your device.
  • Change your keys: Under Tunnel settings → Keys → Change, click Generate new keys. You'll need to install the new config before any of the tunnel's IPs will work again.

Need help?

Open the Support tab in your dashboard and we'll help you get connected.

Keep your WireGuard config private. It contains your private key, so never send it to anyone, including support.