Can someone help me set up my rpi4 as a wireguard server on openwrt

lets just do uci commands, thanks lol

or whatever is easiest

wait is the list allowed ips related to what i should put as the interface address, or should interface address be 192.168.9.2/24 like you said?

For this, you may find it easier to use the web interface...

  • Network > Interfaces > VPN [edit button]
    • IP addresses --> click the x next to the IPv6 address
    • Peers tab > edit your peer
      • Allowed IPs --> click the x next to the IPv6 address

on the OpenWrt device, the allowed IPs should be 192.168.9.2/32. On the remote peer (i.e. your phone), it doesn't matter if it is a /24 or /32 designation, but the address must be 192.168.9.2

1 Like

ok everything is working rn thank you so much, quick question though i need to set up individual peers per device connected correct?

Yes you can add more peers with additional wireguard_vpn blocks. Each peer needs:

  • a unique IP like 192.168.9.3, 192.168.9.4 etc.
  • It's own unique encryption key pair. Best security practice is to generate keys on the client and copy only the public key to the server.
  • The same preshared key can be used for multiple clients, or they can be different.
2 Likes

rebooted the router and im guessing some part of the setup didnt persist as wireguard didnt like it

what specifically didn't persist?

Can you post your latest config (network and firewall files)?

oh lol i mightve figured it out, my ip isnt static so it changed after the reboot most likely causing all of these problems

that was indeed the problem actually that makes a lot of sense

thank god for ddns, also thanks for the help man much appreciated

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