If you are attempting to access router gui it will never work using router wg address, it only listens to the lan ip.
To make the rules auto apply at boot or peer restart:
Exit wgm and amtm.
Edit/create the file wgm executes when wg11-starts:
Code:
nano /jffs/addons/wireguard/Scripts/wg11-up.sh
Paste in:
Code:
#!/bin/sh
iptables -I INPUT -i wg11 -j ACCEPT
iptables -I FORWARD -i wg11 -j ACCEPT
iptables -t nat -D POSTROUTING -s $(nvram get lan_ipaddr)/24 -o wg11 -j MASQUERADE -m comment --comment "WireGuard 'client'"
Save and exit nano editor (cntrl+x y enter).
Make the file executable:
Code:
chmod +x /jffs/addons/wireguard/Scripts/wg11-up.sh
edit/create the file wgn executes when stopping wg11:
Code:
nano /jffs/addons/wireguard/Scripts/wg11-down.sh
Paste in the content:
Code:
#!/bin/sh
iptables -D INPUT -i wg11 -j ACCEPT
iptables -D FORWARD -i wg11 -j ACCEPT
Save and exit nano.
Make it executable:
Code:
chmod +x /jffs/addons/wireguard/Scripts/wg11-down.sh
That should be it!