(Solved) Wiki: VPN: Automated WireGuard Server and Multi-client

@willowen100 #I hope it's allowed to tag you

I'm using the script "Named Peers with IDs" here, I get an error in the section
# Create WireGuard interface for 'LAN' network
with error message
Creating WireGuard interface for 'lan' network... uci: Invalid argument

If I input the lines of that section in one by one the the error occurs at
uci set firewall.${LAN}.network="${firewall_zone} wg_${firewall_zone}"

The little programming I can remember tells me this assigns someting_space_something to the variable firewall.${LAN}.network. Is this right that there are supposed to be two pieces of text there separated by a space ?

I've also tried decyphering the string-bit ${firewall_zone} but that's a bit too heavy for me :slight_smile:

And just did some more testing with this

root@OpenWrt:~# uci set firewall.${LAN}.network="${firewall_zone} wg_${firewall_zone}"
uci: Invalid argument

root@OpenWrt:~# echo ${LAN}

root@OpenWrt:~# echo wg_${firewall_zone}

root@OpenWrt:~# uci set firewall.${LAN}.network="lan wg_lan"
uci: Invalid argument

root@OpenWrt:~# uci set firewall.lan.network="lan wg_lan"
uci: Invalid argument

This is way too simple to not be working :smiley: Is it that I'm assigning stuff to firewall.lan.network and that doesn't exist yet ?

I figured out what the command does.

I used Luci to "Create / Assign firewall-zone" to add wg_lan.

And in my case command line just didn't do that, wouldn't work.

So now I'm a step further and this certainly isn't a documentation problem. Sorry for the hassle.


This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.