Setting up AmneziaWG on an OpenWRT router

Make sure your router has OpenWRT version 23.05.0 or higher.


The Kill Switch feature helps block connections that bypass the VPN tunnel. Set up your router according to these instructions and the Kill Switch function will be activated.

Open a command line (on Windows) or Terminal (on macOS, Linux) and connect to the router via SSH and enter the password for the admin panel.

ssh root@192.168.1.1

Enter the following command to install the AmneziaWG:

sh <(wget -O - https://raw.githubusercontent.com/Slava-Shchipunov/awg-openwrt/refs/heads/master/amneziawg-install.sh)

Setup AmneziaWG on router OpenWRT


Agree to configure amneziawg interface.

Configure AmneziaWG interface on router OpenWRT


In the section Subscriptions download configs for AmnesiaWG.

Download configs AmneziaWG


Select the config you want to connect to and enter the data from this config (PrivateKey, Address, Endpoint, Port and connection parameters J, S, H).

Wait for AmnesiaWG installation to finish.

Go to the admin panel of the OpenWRT router at 192.168.1.1 and edit the connection awg1.

Edit AmneziaWG interface on an OpenWRT router


Click to button Load configuration.

Load AmneziaWG config on the OpenWRT router


Paste all the code from the selected config.

Paste the AmneziaWG config on the OpenWRT router


Edit Peers.

Edit Peers AmneziaWG on the OpenWRT router


Check the box.

Route Allowed IPs for AmneziaWG on the OpenWRT router


Save settings.

Save settings for AmneziaWG on the OpenWRT router


Save all changes and restart the awg1 interface.

Restart the AmneziaWG interface on the OpenWRT router





Ask your question