Skip to content

A tool to update DNS A records on Cloudflare DNS servers to a public IP provided by a FreshTomato router.

License

Notifications You must be signed in to change notification settings

schrer/freshdns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FreshDNS

This is a tool meant to provide a dynamic DNS setup for users of a FreshTomato router and Cloudflare domains.
The program runs as a one-shot application, so it needs to be coupled with e.g. systemd to regularly check and update the A records.

The application takes the current WAN IP from the routers admin page, compares it with all A records in the Cloudflare domains zone, then updates the entries if they do not match the current WAN IP. All A records get the same IP address.

Config

The config file has to be named config.toml and needs to be saved in the working directory that you are using. All values are mandatory.

[freshtomato]
username = "user"
password = "password"
url = "<router_hostname>"

[cloudflare]
api_key="<cloudflare_api_key>"
zone_id="<zone_id>"

The Cloudflare API key needs to be created with rights to read and write the zone/domain you want to keep updated. The zone ID can be found through your Cloudflare dashboard.

About

A tool to update DNS A records on Cloudflare DNS servers to a public IP provided by a FreshTomato router.

Topics

Resources

License

Stars

Watchers

Forks

Languages