An AmneziaWG cascade is two VPS working as one VPN. Clients connect to an entry server in Russia; traffic to Russian IP ranges leaves directly from the entry, and everything else goes through a second server abroad.

Why bother? With a normal full tunnel, every Russian service sees the foreign address of your VPS. The complaint I hear most is about a banking app, not YouTube: big banks and marketplaces often meet a foreign hosting address with a bot check or just refuse it. Other Russian services take a detour through another country and back. With a cascade, Russian services see a Russian address, foreign sites still see a foreign one, and each client keeps a single connection with nothing special to configure.

There's one more reason. Some regional ISPs have a poor international route, and an entry server in Moscow fixes that. In one case I saw, a user in Siberia lost 30-50% of packets on the direct path to a foreign data center, and 0% when the same traffic went through Moscow first.

 Russian IP ranges, direct +---------------------------------> these destinations see the entry IP | client --------> AWG0 entry (Russia) | +--- awg1 tunnel ---> AWG1 exit (abroad) ---> everything else sees the exit IP 

The split is by destination IP, not by "Russian site". The entry keeps a list of Russian networks; addresses on the list go out directly, the rest go abroad. So a Russian site behind a foreign CDN goes abroad, and some Google caches that sit on Russian addresses go direct.

In short: install AmneziaWG on both VPS, connect the Russian entry to the foreign exit, set up routing and autostart on the entry, then test both paths from a client. Plan on about an hour; the two installs can run in parallel.

The scheme comes from @glfenix in discussion #120. I tested it on several test servers, wrote it up as CASCADE.en.md, and keep a few of these running for friends. This post is the short path; the full routing script lives in the guide.

Is this for you?

If one server abroad is enough, you don't need a cascade. If you're fine splitting traffic on each device, AllowedIPs does that without a second server (split tunneling). The cascade is for when you want the split on the server, the same for every client, without configuring routing on each device.

A few things to know before you start:

  • It's a manual setup on top of two normal installs; the installer itself doesn't manage it.
  • It's IPv4 only. The list of Russian networks has no IPv6.
  • The entry sees all client traffic, so keep SSH access to it restricted. Don't turn UFW off "for speed" either: it costs next to nothing.
  • On mobile data, UDP itself is sometimes cut or throttled. A Russian entry doesn't change that.
  • Exit addresses do get blocked from Russia, and not rarely. Know where you'd get a new one before you need it.

Requirements for both VPS

  • Two clean VPS that do nothing else, with Debian 13 or Ubuntu 24.04 / 26.04 and root. The installer removes packages a VPN server doesn't need (with --yes, automatic security updates too) and reboots twice.
  • The entry in Russia, the exit abroad. "Near Russia" won't do for the entry, the whole point is a Russian address. For the exit, check which hosting networks are restricted from Russia before you pay.
  • The same protocol generation on both. The installer sets up AmneziaWG 3.1 by default but picks 2.0 by itself on some systems, and the entry connects to the exit as a regular client, so they have to match. Compare the "Protocol generation" line in both final reports; if they differ, the guide shows how to install both with --protocol=2.0. Your client apps need to support that generation too.
  • A real public IP on both, not provider NAT: curl -s ifconfig.me should print the same address ip -4 addr shows on the interface.
  • The exit's UDP port open in your provider's cloud firewall, if it has one. UFW on the server is handled by the installer.
  • Different subnets. Below, the entry (AWG0) uses 172.16.17.1/24 and the exit (AWG1) uses 172.16.61.1/24.

Step 1. Install both servers

On each server, download the installer from the latest release (you can verify the signature first):

wget -O install_amneziawg_en.sh https://github.com/bivlked/amneziawg-installer/releases/latest/download/install_amneziawg_en.sh 

Run it with its own subnet:

# on AWG1 (exit) sudo bash install_amneziawg_en.sh --yes --disallow-ipv6 --route-all --subnet=172.16.61.1/24 # on AWG0 (entry) sudo bash install_amneziawg_en.sh --yes --disallow-ipv6 --route-all --subnet=172.16.17.1/24 

Each server reboots twice. After every reboot, log back in and run the same command; it continues where it stopped and ends with a final report. If you want every detail of this step, see my full AmneziaWG installation walkthrough.

Then add two packages on the entry:

sudo apt update && sudo apt install -y curl ipset 

Step 2. Connect the entry to the exit

On the exit, create a client for the entry. It's for the link between the servers, not for a person:

sudo bash /root/awg/manage_amneziawg.sh add ru_host 

You get /root/awg/ru_host.conf. It holds the private key (and on 3.1 the header protection key), so copy it with scp, not through a messenger. Its Endpoint port is the one from the exit's final report: new installs pick a random port, and servers installed before v6.3.0 without --port listen on 39743.

On the entry, save it as /etc/amnezia/amneziawg/awg1.conf with two edits in [Interface]: add Table = off and delete the DNS = ... line. Copy the rest as is, don't retype it: S1-S4, H1-H4 and on 3.1 HeaderProtectionKey must match the exit exactly. Table = off stops awg-quick from touching routes; the script in step 3 handles that.

sudo chmod 600 /etc/amnezia/amneziawg/awg1.conf sudo systemctl start awg-quick@awg1 sudo awg show awg1 

A latest handshake line means the tunnel to the exit is up. Don't test it with ping from the entry: the handshake is the check, and routing for client traffic only appears in step 3.

Step 3. Add the routing script and autostart

Create /root/awg/awg-routing.sh on the entry from step 4 of the guide and fill in the settings at the top. These four matter:

CLIENT_SUBNET="172.16.17.0/24" # the entry's client subnet (.0/24, not the server address) AWG1_ENDPOINT="CHANGE_ME" # the exit's IP: an address, not a host name, no port AWG1_SRC="" # leave empty; set it only to run the tunnel from a separate IP EXTRA_RU_NETS="" # your own addresses that should go direct 

It's a script that rewrites routing and firewall rules on your server, so here's what it does:

  1. Downloads the list of Russian networks from ipdeny. If that fails, it uses the snapshot in my repository, and failing that, the list it already has.
  2. Loads the list into an ipset called ru through a temporary set, so the active list is never empty mid-update.
  3. Creates routing table 100 with a default route through awg1 and a fallback unreachable route, plus a rule that sends marked traffic there.
  4. Keeps the route to the exit itself outside the tunnel, so the tunnel doesn't loop into itself.
  5. Marks client traffic that isn't going to a Russian address and NATs it into awg1.

You can run it as often as you like; each run also refreshes the list. Run it once now:

sudo chmod +x /root/awg/awg-routing.sh sudo bash /root/awg/awg-routing.sh 

The last line should start with OK: cascade routing applied. OK WITH A CAVEAT means some EXTRA_RU_NETS entries weren't accepted and those addresses will go abroad.

For autostart, create the awg-routing.service unit from step 5 of the guide; it runs the script after both tunnels are up. Then:

sudo systemctl daemon-reload sudo systemctl enable awg-quick@awg1 awg-routing sudo systemctl start awg-routing 

Don't skip the start. Without it the unit waits for the next boot, and until then restarting awg1 won't bring the routing back.

Restarting the tunnel and booting the server behave differently. If you restart a working awg1, its route vanishes for about 10 seconds and the fallback route drops client traffic instead of letting it out directly. On a test server, before that fallback existed, the entry's own address leaked out in 17 of 25 samples during a restart. But if awg1 doesn't come up at boot, the script never runs, and clients go out directly from the entry with no split at all. It's not a kill switch.

Step 4. Add clients and check both paths

Clients are added on the entry, as usual:

sudo bash /root/awg/manage_amneziawg.sh add my_phone 

Import my_phone.conf (or scan its QR code) in an app that supports the server's generation, connect, and check the entry:

ip rule show | grep fwmark # 10000: from all fwmark 0x1 lookup 100 ip route show table 100 # default dev awg1 scope link # unreachable default metric 65535 sudo ipset list ru | grep "Number of entries" # Number of entries: 8600+ systemctl is-active awg-routing # active 

The test I trust most is the packet counters. Zero them, make some traffic from the connected client, and look again:

# on the entry sudo iptables -t mangle -Z PREROUTING # on the client curl https://ifconfig.me # prints the exit's address ping -c3 77.88.55.242 # a Russian address (Yandex) # on the entry sudo iptables -t mangle -L PREROUTING -n -v # RETURN ... match-set ru dst <- went up: traffic to Russia went direct # MARK ... MARK set 0x1 <- went up: the rest went through awg1 

Reboot the entry once and repeat: systemctl is-enabled awg-quick@awg1 awg-routing, systemctl status awg-routing, then the counters. Rules can look right while the traffic doesn't, so the client test is the one that counts.

Keeping it running

  • Russian networks change, so refresh the list weekly, for example with cron: echo '0 5 * * 1 root systemctl restart awg-routing' | sudo tee /etc/cron.d/awg-routing-refresh. A systemd timer works too, but the unit needs a change for it; the guide has the details.
  • If awg1 goes down and up some other way than systemctl restart (a stop and start, or ip link set ... down), its route doesn't come back by itself; sudo systemctl restart awg-routing fixes that.
  • Run the script again after a --force reinstall of the entry.
  • After a kernel update and reboot, check that the module is loaded: cat /sys/module/amneziawg/version exists only when it is. I update one server at a time, exit first.
  • Put some outside monitoring on both servers, even a plain ping from another machine. A dead server can otherwise sit unnoticed for hours.

What if the exit gets blocked?

On the entry, sudo awg show awg1 stops showing a fresh latest handshake. Clients lose foreign sites, and Russian ones too, because their DNS goes through the exit.

First open the console in your provider's panel: a server frozen or switched off by the provider looks exactly like a block. If the server is fine but ping and ssh to it fail from the entry, the address is most likely blocked from Russia. Test from the entry itself, not from your laptop behind a VPN; a check from another country is useful only as a comparison. Also rule out a firewall rule or a Fail2Ban ban on the entry's address.

The fix is a new exit, and client profiles stay the same because clients only know the entry:

  1. Install a new exit with the same --subnet and issue ru_host on it.
  2. Replace awg1.conf on the entry (again with Table = off, without DNS) and chmod 600 it.
  3. Put the new address into AWG1_ENDPOINT in the script.
  4. sudo systemctl restart awg-quick@awg1 and sudo ip route del OLD_EXIT_IP.

Then check that sudo awg show awg1 has a fresh handshake, systemctl is-active awg-routing says active, and curl -s ifconfig.me on a client prints the new exit. If you moved the refresh to a systemd timer, also run sudo systemctl start awg-routing.

On a test server with the 3.1 profile I rebuilt the exit from scratch, and the entry's client worked again without touching its config; foreign sites were down for about 10 seconds while the rules were reapplied. If your provider simply gave the exit a new address, you don't need a new server: change Endpoint in awg1.conf and do items 3 and 4 (some providers want a reboot from their panel first). The full recipe, with two extra checks for older scripts and AWG1_SRC, is in If the exit gets blocked.

When routing looks wrong

  • Everything goes abroad, Russian sites too: the list is probably empty. Check sudo ipset list ru | grep "Number of entries", systemctl status awg-routing and the script's last line. If ipdeny is blocked on your network, the script falls back to the snapshot; with no list at all it stops with an error.
  • One Russian service still goes abroad: it's behind a foreign CDN, its networks are registered to a company abroad, or its DNS answer, asked through the exit, may point outside Russia. Add its addresses to EXTRA_RU_NETS and run sudo systemctl restart awg-routing.
  • YouTube and Google act "Russian": some of their caches sit on Russian addresses and go direct. The guide shows how to push them through the exit and what it costs.
  • A site sees two different addresses: a script on the page asked a third-party IP service, and that request went through the exit. Any split behaves this way (details).
  • Upload is slow but download is fine: look at the leg from the entry to the exit. Measure it with iperf3 between the two servers (install it on both and open TCP 5201 on the exit for the entry's address only while you test).
  • Your home IPv6 address shows up: run curl -6 ifconfig.co on a connected device. An error is expected with this setup; your home address means IPv6 is going around the tunnel.

What to post when asking for help

On 3.1, awg show prints the header protection key in clear text and its endpoint line shows your exit's address; awg show ... dump prints the private and preshared keys. Never paste awg1.conf or ru_host.conf. When I ask for help, I post only this:

sudo awg show awg1 | grep -E '^interface:|latest handshake|transfer' systemctl is-active awg-quick@awg1 awg-routing ip rule show | grep fwmark ip route show table 100 sudo ipset list ru | grep "Number of entries" sudo iptables -t mangle -S PREROUTING | grep -E 'match-set|MARK' sudo iptables -t nat -S POSTROUTING | grep -- '-o awg1' 

No latest handshake line in the first output means no handshake has completed on the tunnel yet, and that alone narrows things down a lot.

Removing the cascade

To remove it, take it apart with the commands from the guide and run sudo bash /root/awg/manage_amneziawg.sh remove ru_host on the exit. Only then use the installer's --uninstall, if you want it: the installer doesn't know about awg1 or the cascade unit.

Optional setups

Two variations live in the same guide. Three servers puts a middle server between entry and exit, so from Russia the link only shows the middle's address and a blocked exit is replaced without touching the entry. The catch is that whenever the middle's awg1 is down, including the first seconds after a reboot, traffic leaves from the middle's address. A user in #120 built that chain; I haven't run it on my own servers. And own addresses for each role is for an entry with several IPv4 addresses.

Questions go to discussion #120, where this started, or to Issues. If the installer saved you some time, a star on GitHub helps other people find it. There's also a Russian write-up on Habr, and how AmneziaWG hides WireGuard traffic in the first place is here.