I've been trying to get wireguard to work for many hours without success.
I'm only looking to use wireguard to get access to IPMI control panels in colocation.
I'm very new to all of this, it seems like I'm in over my head.
On Server:
IP 10.0.10.0 is not valid. Use 10.0.10.1/24
Don't use endpoint port (unless the peer is not behind NAT beyond your control), no need to Route Allowed IPs.
The forward on the firewall is wrong, you need a rule to allow udp/1234 from wan to device.
On client:
Remove the listen port, unless you are not behind nat beyond your contol.
Add the option to Route Allowed IPs.
-I've changed the interface IP to 10.0.10.1/24 (tried before, set to x.0 according to some post)
-Removed endpoint port from openwrt peer setting
-Disabled "route allowed IPs" in openwrt peer settings
-Removed the listen port on client
-Edited the firewall rule:
Time is synced.
I've set it to everything for now for debugging, what I actually need is to just provide access to some machines in lan 10.0.0.100-10.0.0.150.
The client is running windows.
I read before I should try a different subnet for wireguard (hence 10.0.10.1/24 for the interface) so I'm first trying to get anything to work to see some kind of handshake.
Setup a packet capture and see if there are incoming packets: opkg update; opkg install tcpdump; tcpdump -i any udp port 1234
Then try from the windows to send any traffic.
This isn't much. Just the windows trying to contact the OpenWrt. Since there is no response, it means that there is misconfiguration. Check the keys in case there was a typo. Make sure you have assigned them correctly.
Private key of each machine goes to Interface.
The public key of each machine goes to the peer section of the other machine!
This means that the public key of the Windows will be entered in the OpenWrt-peer-Public Key field.
I've checked the key pairs countless times, those are assigned as you describe;
Created a keypair on the router, used the priv key in the interface, the public key in windows client peer. The keypair generated on the windows client: priv key in interface, public key to wireguard peer section.
I have now changed the interface to 10.0.0.10/27 and peer to 10.0.0.11/32 which is working as excpected, however I've read that this should not be done for some reason? (ie. setting the vpn to a lan subnet)