I've a below wireguard configuration at the server side
[Interface]
ListenPort = 51820
PrivateKey = oPernzzF+Kl499z2TMwemZLUN6/e630Q=
[Peer]
PublicKey = yyhY5Blx+PxCHu/wK7QgiL/veRrXHQ34RmTi//zynVA=
AllowedIPs = 10.0.8.2/32
PersistentKeepalive = 25
Since I didn't specify the Address in the interface section, the default IP address for the server after establishing the wireguard connection is 10.0.8.1. However, the actual IP address of my server is 192.168.0.230 and it hosts a httpd webpage on port 80. The server is not in a production environment and is running on openBSD 7.3 stable. This wireguard configuration is functioning perfectly.
To access the webpage after establishing the wireguard connection, I need to enter 10.0.8.1:80 instead of 192.168.0.230:80. I have also tested this configuration on a digital ocean ubuntu 23.04 server and obtained the same result. Therefore, since the server's IP address is changing, there may be a domain name conflict and I do not want my clients to directly use the IP address. Is there a solution to this issue so that I can resolve it with the server's domain name only?
192.168.0.230/32(or192.168.0.0/24) to allowed IP's in the client config? hmmm, I may have misunderstood the question :p