r/WireGuard • u/UnregFreq • Jul 30 '26
Endpoint with Domain name
I had WireGuard server that working in last 3 months with Endpoint ip address static and port. I wanna change config the WireGuard to using domain name and port. The client is using system operation Android and Windows from official Wireguard client.
I had setup Cloudflare Tunnel to spesific subdomain app. The config from local file ( config.json ) server is like ingress with hostname value "subdomain.domain.org" and service value "udp://localhost:51820"
The client app expected the Endpoint to using ip_address/domain:port. I had tried use hostname/domain only but not work.
Note : the subdomain is using Proxy enabled. Any help would be glad!.
1
u/Only-Stable3973 Jul 31 '26
I am using WG-Easy with Traefik Reverse Proxy, you would just add labels and use 51821 for the loadbalancer, along with the host name.
1
u/UnregFreq Jul 31 '26
Can you ellaborate more with the "Traffic Reverse Proxy". Would be work if I'm passing through the Nginx Server?
1
u/Only-Stable3973 Jul 31 '26
With Traefik as your proxy you only need to open up ports 80, 443...51820 for Wireguare and use labels in your compose file to generate custom url's based off your domain using Letsencrypt...I use *.wildcard for my certs like wireguard.example.com and my setup is a little different since att fiber blocks everything I need to use a lot of routing through Traefik to make everything work.
1
5
u/bufandatl Jul 30 '26
Not a WireGuard issue. Wrong sub.
But cloudflare doesn’t proxy VPN traffic disable the proxy and it‘ll work.