this post was submitted on 17 Nov 2024
26 points (90.6% liked)

Selfhosted

40296 readers
343 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

Like the title says, I want to replace the IP address in a wireguard .conf file to be a domain instead.

I own a domain through cloudflare, so say I wanted to use vpn.example.org

What DNS record and info do I need to put into Cloudflare? (I am aware I'll need to update it if my ip changes)

top 9 comments
sorted by: hot top controversial new old
[–] Decipher0771@lemmy.ca 32 points 4 days ago (1 children)

Just an A record, you just need the domain query to resolve to your IP.

[–] Dust0741@lemmy.world 10 points 4 days ago (1 children)

Thank you. It really was that simple

[–] majestictechie@lemmy.fosshost.com 2 points 4 days ago (1 children)

I do this on my home network which has a Dynamic IP. I wrote a script which I cron to check and update it if it changes https://github.com/MajesticTechie/CloudflareDynamicDNS

[–] SaltySalamander@fedia.io 1 points 4 days ago

I do this with the dynamic dns plugin in OPNsense. It really is set-it-and-forget-it.

[–] eskuero@lemmy.fromshado.ws 10 points 4 days ago* (last edited 4 days ago)

Note that most wireguard clients wont re-resolve when the dns entry changes and they will keep silently a failed tunnel so you would have to do some measure to periodically restart the tunnel.

[–] state_electrician@discuss.tchncs.de 3 points 4 days ago (2 children)

It is that easy, like you said. And with Cloudflare and Caddy you can get TLS for your internal VPN hosts. I love that.

[–] Ajen@sh.itjust.works 1 points 16 hours ago (1 children)

LetsEncrypt is a good option if you want to set it up yourself. More work than cloudflare though.

I am using Let's Encrypt. Cloudflare is used for DNS validation.

[–] Dust0741@lemmy.world 1 points 3 days ago

Yup! This is what I do! Love it so much