This is my setup of AmneziaWG on GL.iNet MT-3000 router, based on this and this instructinos
Prerequisites:
- A GL.iNet MT-3000 router.
- AmneziaVPN server with configuration.
- Internet access for your router during the setup process.
Summary of Steps:
- Update GL.iNet MT-3000 Firmware.
- Install AmneziaWG Packages.
- Get/generate AmneziaWG Client Configuration.
- Configure AmneziaWG Interface in LuCI.
- Create Firewall Rule.
- Enable "Route Allowed IPs".
- Verify Connection.
Step 1: Update GL.iNet MT-3000 Firmware
-
Download Firmware: Go to the official GL.iNet download page and download the
4.6.6-op24
firmware for your MT-3000. -
Install Firmware:
- Access your GL.iNet router's web interface (usually http://192.168.8.1).
- Navigate to System -> Upgrade.
- Upload the downloaded firmware file.
- Important, when prompted, choose to install without saving the old configuration. This ensures a clean slate and avoids potential conflicts.
- Wait for the router to complete the firmware upgrade and reboot.
Step 2: Install AmneziaWG Packages
- Access LuCI: Once the router has rebooted, log in to the LuCI web interface. (e.g., http://192.168.8.1/cgi-bin/luci).
- Download AmneziaWG Packages: On your computer, download the following AmneziaWG packages from the Amnezia GL.iNet MT-3000 releases page for firmware version
4.6.6
:
kmod-amneziawg_4.6.6.ipk
amneziawg-tools_4.6.6.ipk
luci-proto-amneziawg_4.6.6.ipk
- Install Packages:
- In LuCI, navigate to System -> Software.
- Click on the Upload Package... button.
- Upload and install each of the three downloaded
.ipk
files one by one (in order as mentioned above).
Step 3: Get/Generate AmneziaWG Client Configuration
- Open AmneziaVPN App on your phone:
- Select "Share" option within the existing connection .
- Change "Connection format: AmneziaWG native format"
- Copy Configuration Details, in a text format similar to the example below.
[Interface]
Address = 10.2.2.2/32
DNS = 1.1.1.1, 1.0.0.1
PrivateKey = +a/XXXxXXXXXXXX=
Jc = 1
Jmin = 10
Jmax = 10
S1 = 111
S2 = 111
H1 = 2233232
H2 = 2233232
H3 = 2233232
H4 = 2233232
[Peer]
PublicKey = XXXXXXXXXXXXXXXXXXXX=
PresharedKey = XXXXXXXXXXXXXXXXXXX2=
AllowedIPs = 0.0.0.0/0, ::/0
Endpoint = yourAmneziaServer:port
PersistentKeepalive = 25
Step 4: Configure AmneziaWG Interface in LuCI
- Create New Interface:
- In LuCI, navigate to Network -> Interfaces.
- Click on the Add new interface... button.
- Enter
AWG
as the Name of the new interface. - From the Protocol dropdown, select AmneziaWG.
- Click Create interface.
- Import AmneziaWG Configuration:
- On the next screen, you will be on the Interface: AWG settings page.
- Look for an option to "Import configuration"
- You may need manually define some params
Step 5: Create Firewall Rule
Configure Firewall Zone:
- While still on the Interface: AWG settings page, go to the Firewall Settings tab.
- Create a new firewall zone for the
AWG
interface. You can name itawg_zone
. - Set the Input, Output, and Forward policies to accept.
- Under Covered networks, ensure that
AWG
is selected. - Under Allow forward to destination zones, select
wan
. - Under Allow forward from source zones, select
lan
. - Click Save.
Step 6: Enable "Route Allowed IPs"
This is a crucial step that was not explicitly clear in the original instructions but was necessary for your setup.
- Go to Interface Settings: Navigate back to Network -> Interfaces.
- Edit AWG Interface: Click on Edit next to your
AWG
interface. - Go to Peer Settings: Navigate to the Peers tab within the AWG interface configuration.
- Check "Route Allowed IPs": Locate the specific peer configuration (the one corresponding to your AmneziaWG server). Check the box next to "Route Allowed IPs."
- Save & Apply: Click Save at the bottom of the page, and then click Save & Apply to apply all changes.
Step 7: Verify Connection
- Interface Status: Go to Network -> Interfaces. Your
AWG
interface should now show as "Up" or "Connected" if the configuration is correct. - Test Connectivity:
- Connect a device (e.g., your computer or phone) to your GL.iNet MT-3000's Wi-Fi or LAN.
- Verify your public IP address using a website like whatismyip.com. It should now reflect the IP address of your AmneziaWG server.