Newbie trying to set up wireguard


Error
Unhandled exception during request dispatching
module 'luci.ucodebridge' not found:
	no field package.preload['luci.ucodebridge']
	no file './luci/ucodebridge.lua'
	no file '/usr/share/lua/luci/ucodebridge.lua'
	no file '/usr/share/lua/luci/ucodebridge/init.lua'
	no file '/usr/lib/lua/luci/ucodebridge.lua'
	no file '/usr/lib/lua/luci/ucodebridge/init.lua'
	no file './luci/ucodebridge.so'
	no file '/usr/lib/lua/luci/ucodebridge.so'
	no file '/usr/lib/lua/loadall.so'
	no file './luci.so'
	no file '/usr/lib/lua/luci.so'
	no file '/usr/lib/lua/loadall.so'

In [anonymous function](), file [C]

In [anonymous function](), file /usr/share/ucode/luci/runtime.uc, line 133, byte 10:
  called from function [arrow function] (/usr/share/ucode/luci/runtime.uc:141:63)
  called from function render ([C])
  called from function [anonymous function] (/usr/share/ucode/luci/runtime.uc:141:64)
  called from function run_action (/usr/share/ucode/luci/dispatcher.uc:778:34)
  called from function [anonymous function] (/usr/share/ucode/luci/dispatcher.uc:1003:48)
  called from anonymous function (/www/cgi-bin/luci:39:13)

 `            die(ex);`
  Near here --------^

got a cool big error screen after trying to install just wireguard and wireguard tools OwO

this is what happens when I rebooted router as per instructions in wireguard setup (right after installing wireguard and the toolkit)

edit: looks like I somehow deleted the gui ? file ?

steps fresh rest
install unbound - get errors
uninstall unbound

install wireguard luci app and wireguard tools
reboot
get this error

can still ssh in - but I dont have experience ssh'ing in and editing configs manually like that yet -_-

@lumilumi this thread is about setting up WireGuard.

It is good practice to stay on that topic and if you want to asks questions about another topic then start a new thread.

Furthermore if a topic is solved then mark it as such so that other users know there is a viable solution described, so If your problem regarding WireGuard is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.
Thanks! :slight_smile:

Then start a new thread about other subjects

2 Likes

I'm guessing you've updated som packages?

Canned answer:

Upgrading packages (via the CLI opkg upgrade command or the LuCI Upgrade... button) can result in major problems. It is generally highly discouraged, unless you know what you are doing or if there is specific instruction to do so.

1 Like

no packages were updated in the making of these errors - I just installed unbound to a freshly reset router - uninstalled after errors

tried to install wireguard luci and wireguard tools

reboot - then these errors

Then the uninstall pulled some dependencies needed for the webui.

Reinstall the Luci package (not sure of name, I'm traveling).

Or reset, again :slight_smile:

ok well, fresh install of wireguard and fresh keys and fresh keys to try and install wireguard - even used the config from mullvad! and it still knocked out my internet connection, if anyone has any iideas I would really appreciate help

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button (red circle; this works best in the 'Markdown' composer view in the blue oval):

Screenshot 2025-10-20 at 8.14.14 PM

Remember to redact passwords, VPN keys, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall
{
	"kernel": "6.6.119",
	"hostname": "OpenWrt",
	"system": "ARMv8 Processor rev 4",
	"model": "OpenWrt One",
	"board_name": "openwrt,one",
	"rootfs_type": "squashfs",
	"release": {
		"distribution": "OpenWrt",
		"version": "24.10.5",
		"revision": "r29087-d9c5716d1d",
		"target": "mediatek/filogic",
		"description": "OpenWrt 24.10.5 r29087-d9c5716d1d",
		"builddate": "1766005702"
	}
}
root@OpenWrt:~# cat /etc/config/network

config interface 'loopback'
	option device 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fd1e:afe9:9806::/48'
	option packet_steering '1'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth1'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config interface 'wan'
	option device 'eth0'
	option proto 'dhcp'

config interface 'wan6'
	option device 'eth0'
	option proto 'dhcpv6'

config interface 'WIREGUARD'
	option proto 'wireguard'
	option private_key 'ixxx='
	list addresses '10.70.71.67/32'
	list dns '9.9.9.9'
	list dns '149.112.112.112'

config wireguard_WIREGUARD
	option description 'Imported peer configuration'
	option public_key 'xxx'
	list allowed_ips '0.0.0.0/0'
	list allowed_ips '::0/0'
	option endpoint_host '185.213.193.3'
	option endpoint_port '51820'

root@OpenWrt:~# cat /etc/config/wireless

config wifi-device 'radio0'
	option type 'mac80211'
	option path 'platform/soc/18000000.wifi'
	option band '2g'
	option channel '1'
	option htmode 'HE20'
	option num_global_macaddr '7'
	option cell_density '0'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option ssid 'donkeykong2'
	option encryption 'psk2'
	option hidden '1'
	option key '3xp4ndk0ng'

config wifi-device 'radio1'
	option type 'mac80211'
	option path 'platform/soc/18000000.wifi+1'
	option band '5g'
	option channel '36'
	option htmode 'HE80'
	option num_global_macaddr '7'
	option disabled '1'

config wifi-iface 'default_radio1'
	option device 'radio1'
	option network 'lan'
	option mode 'ap'
	option ssid 'OpenWrt'
	option encryption 'none'

root@OpenWrt:~# cat /etc/config/dhcp

config dnsmasq
	option domainneeded '1'
	option boguspriv '1'
	option filterwin2k '0'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option nonegcache '0'
	option cachesize '1000'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
	option nonwildcard '1'
	option localservice '1'
	option ednspacket_max '1232'
	option filter_aaaa '0'
	option filter_a '0'

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option dhcpv4 'server'
	option dhcpv6 'server'
	option ra 'server'
	option ra_slaac '1'
	list ra_flags 'managed-config'
	list ra_flags 'other-config'

config dhcp 'wan'
	option interface 'wan'
	option ignore '1'

config odhcpd 'odhcpd'
	option maindhcp '0'
	option leasefile '/tmp/hosts/odhcpd'
	option leasetrigger '/usr/sbin/odhcpd-update'
	option loglevel '4'
	option piofolder '/tmp/odhcpd-piofolder'

hopefully that was what u meant

All looks generally okay.

What about wg show?

interface: WIREGUARD
public key: (my pubkey)
private key: (hidden)
listening port: 42423

peer: qD3AH8vI8MhEVc9+0+2O8zV0Gx9FfKdy7ri3Bnpzo10=
endpoint: 185.213.193.3:51820
allowed ips: 0.0.0.0/0, ::/0

Looks like it has not had a handshake. That is likely an issue with the keys.

do you know how I can fix that?

do I need to generate new keys again? (these are freshly generated as well)

Make sure that the public keys were exchanged properly.

how can I do that if all of my keys were copy and pasted?

I don’t use mulvad, so I don’t know. But they must have a key management tool in your account.

does anyone have any idea why else this might be knocking out my internet connection?

Did you fix the keys? Does wg show indicate a successful handshake?

1 Like
root@OpenWrt:~# wg show
interface: WIREGUARD
  public key: wlbIX9teZI7Zv7idtoXK0m/S9DlpSvrrmiz+72uflWs=
  private key: (hidden)
  listening port: 42423

peer: qD3AH8vI8MhEVc9+0+2O8zV0Gx9FfKdy7ri3Bnpzo10=
  endpoint: 185.213.193.3:51820
  allowed ips: 0.0.0.0/0, ::/0

this is what I get :open_mouth: - idk if that means its working or not

You are not getting a handshake. It will say ā€œlast handshakeā€ (with an elapsed time since that point).

Did you generate new keys?
Have you verified that the config matches exactly with what the provider has given you?

1 Like

I had verified it last time I was working on it but just for good measure Ill regenerate new keys and verify they are inputted correctly