[SOLVED] Wireguard "Interface does not have a public key"

On OpenWrt 18.06-SNAPSHOT r6996-b295e3a, I've installed wireguard. After configuration and reboot, I receive the following on the command prompt:

root@OpenWrt:~# wg
interface: test_wg

on LuCI:

Interface test_wg

Configuration Interface does not have a public key!

Config:

config interface 'test_wg'       
        option proto 'wireguard'     
        option private_key 'xxxxxxxxxxx='
        list addresses '192.xxx.xxx.xxx/32'
                                      
config wireguard_test_wg     
        option public_key 'xxxxxxxxxxx='
        list allowed_ips '0.0.0.0/0'
        option endpoint_host 'xxxxx.xxxxx.xxx'
        option endpoint_port '22222'                                     
        option preshared_key 'xxxxxxxxxxx='

Installed:

kmod-wireguard 4.14.43+0.0.20180531-1
luci-app-wireguard git-18.149.30568-29b4c71-1
luci-proto-wireguard git-18.149.30568-29b4c71-1
wireguard 0.0.20180531-1
wireguard-tools 0.0.20180531-1

I found the problem and solved it.

I am testing this connection within a NAT environment. As this is a new install of OpenWrt, I still had DNS rebind protection on.

My DNS server internally offers an A Record for the wireguard peer that is within RFC1918 IP space. After turning off rebind protection, the wg interface came online. I was also able to use the IP address and the interface came online too.

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