this post was submitted on 17 Nov 2024
23 points (92.6% liked)

Selfhosted

40200 readers
781 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 6 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 2 hours ago

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

[–] [email protected] 8 points 7 hours ago* (last edited 7 hours 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.

[–] [email protected] 30 points 12 hours ago (1 children)

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

[–] [email protected] 10 points 12 hours ago (1 children)

Thank you. It really was that simple

[–] [email protected] 1 points 7 hours 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

[–] [email protected] 1 points 2 hours ago

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