Can I put domain name in [Peer]->Endpoint in wg.conf?

Thumbnail image: Apple Card is a no-fee credit card that gives you up to 3% unlimited Daily Cash back on all of your purchases. Apply now and use right away. Terms apply.

I do.

I also use the same pubkey.

Yes, you can replace the IP address with a FQDN

Note if the IP of that FQDN changes you will have to turn the tunnel off and reactivate it as once the domain name is resolved by wireguard it will not be resolved and since wire guard has no concept of a actual connection It will simply stop working if the IP for that name changes while you're in the middle of using it until you restart the tunnel.

More replies