A Windows client for dynamically updating Cloudflare DNS entries with your public IP address.
Most of us have home computers with dynamically assigned IP addresses provided by our ISPs. If you want to serve up a web site, be able to access files remotely, or use RDP, etc., from the internet, it becomes challenging to locate your machine when the IP address is constantly changing. This is the problem DNS was designed to solve, so by getting a domain name and updating the DNS entries for it as-needed, you can always access your computer by its domain name, and forget about IP addresses.
This is where DnsTube comes in. Cloudflare provides free DNS hosting for your domain, and also provides an API for updating DNS entries, i.e., the IP address in this case. By running DnsTube on your computer, it will periodically check the public-facing IP address and update the Cloudflare DNS entry as needed.
- Can update A (IPv4), AAAA (IPv6), SPF, and TXT records.
- Support both Cloudflare API keys and tokens
- Supports API tokens scoped to specific zones
- Runs as a service
Settings:
Head over to the Releases page to download the latest binary.
- Extract the package to a folder of your choice
- Open a command prompt as Administrator and install the service using
install-service.bat. You should see the following output:
PS C:\Program Files\DnsTubeService> .\install-service.bat
sc create "DnsTube Service" binPath="C:\Program Files\DnsTubeService\DnsTube.Service.exe" start=auto
[SC] CreateService SUCCESS
[SC] ChangeServiceConfig2 SUCCESS
SERVICE_NAME: DnsTube Service
TYPE : 10 WIN32_OWN_PROCESS
STATE : 2 START_PENDING
(NOT_STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x7d0
PID : 21408
FLAGS :
PS C:\Program Files\DnsTubeService>
If you haven't already done so, you will need to create an account with Cloudflare and make it the DNS authority for your domain. You then need to configure your DNS entries as appropriate. See Managing DNS records in Cloudflare for more info.
You can use nslookup to make sure DNS resolution is working correctly, e.g.,
nslookup mydomain.com
After that, you'll need to generate an API Token (preferred) or Key in order to access the API via DnsTube. The details for doing that can be found at Creating API tokens.
Top Pane: The UI shows a list of domains for the zone(s) you have provided, and you can check off the ones you want DnsTube to update.
Lower Pane: The lower pane shows a running log of activity.
- DnsTube only updates existing Cloudflare records. It will not create or remove records.
This solution can be built using Visual Studio 2022.
We all know the internet is a series of tubes. This application uses those very same tubes to update your DNS.
Contributions are welcome!
- D'Arcy Rittich
This project is licensed under the MIT License - see the LICENSE file for details.
Some of the UI was inspired by CloudFlare-DDNS-Updater.

