All Projects → maxisoft → Freenom Dns Updater

maxisoft / Freenom Dns Updater

Licence: mit
A tool to update freenom's dns records

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Freenom Dns Updater

Pypistats
Command-line interface to PyPI Stats API to get download stats for Python packages
Stars: ✭ 86 (-26.5%)
Mutual labels:  api, command-line-tool, cli, pypi
Lexicon
Manipulate DNS records on various DNS providers in a standardized way.
Stars: ✭ 1,028 (+778.63%)
Mutual labels:  cli, dns, pypi
N26
API and CLI to get information of your N26 account
Stars: ✭ 107 (-8.55%)
Mutual labels:  api, command-line-tool, cli
Starcli
✨ Browse GitHub trending projects from your command line
Stars: ✭ 269 (+129.91%)
Mutual labels:  command-line-tool, cli, pypi
Cloudflare Cli
CLI utility managing CloudFlare services using CloudFlare API
Stars: ✭ 61 (-47.86%)
Mutual labels:  api, cli, dns
Hopp Doc Gen
📔 API documentation generator CLI for https://hoppscotch.io
Stars: ✭ 70 (-40.17%)
Mutual labels:  api, command-line-tool, cli
Python N26
💵 Unofficial Python client for n26 (Number 26) - https://n26.com/
Stars: ✭ 116 (-0.85%)
Mutual labels:  api, command-line-tool, cli
Elixir cli spinners
Spinnig Animations for Command Line Applications
Stars: ✭ 117 (+0%)
Mutual labels:  command-line-tool, cli
Csv2db
The CSV to database command line loader
Stars: ✭ 102 (-12.82%)
Mutual labels:  command-line-tool, cli
Mal
MAL: A MyAnimeList Command Line Interface [BROKEN: BLAME MyAnimeList]
Stars: ✭ 104 (-11.11%)
Mutual labels:  cli, pypi
Cli.fan
Blog about notable commandline tools
Stars: ✭ 106 (-9.4%)
Mutual labels:  command-line-tool, cli
Kubernetes Pfsense Controller
Integrate Kubernetes and pfSense
Stars: ✭ 100 (-14.53%)
Mutual labels:  api, dns
Ask Cli
Alexa Skills Kit Command Line Interface
Stars: ✭ 100 (-14.53%)
Mutual labels:  command-line-tool, cli
Awesome Cli
A curated list of awesome resources for building immersive CLI experiences.
Stars: ✭ 104 (-11.11%)
Mutual labels:  command-line-tool, cli
Cryptocurrency Cli
💰 Cryptocurrency Portfolio On The Command Line 💰
Stars: ✭ 99 (-15.38%)
Mutual labels:  api, cli
Rundeck Cli
CLI tool for Rundeck
Stars: ✭ 98 (-16.24%)
Mutual labels:  api, cli
Schema Registry
A CLI and Go client for Kafka Schema Registry
Stars: ✭ 105 (-10.26%)
Mutual labels:  api, cli
Cjstoesm
A tool that can transform CommonJS to ESM
Stars: ✭ 109 (-6.84%)
Mutual labels:  api, cli
Novagram
An Object-Oriented PHP library for Telegram Bots
Stars: ✭ 112 (-4.27%)
Mutual labels:  api, cli
Httpcat
httpcat is a simple utility for constructing raw HTTP requests on the command line.
Stars: ✭ 109 (-6.84%)
Mutual labels:  api, cli

Freenom dns updater

GitHub license Unit Test dev and main branch PyPI - Wheel Total alerts Language grade: Python Quality Gate Status Lines of Code Vulnerabilities deepcode

A tool written in python to update freenom's dns records

Main Features

  • Manage (add/update/remove) a domain's dns record with cli
  • Automatic records updates according to ip (v4/v6) changes
  • Auto renew domains (thanks to Cedric Farinazzo)

Upcoming features

  • Password encryption

Installation

pip install freenom-dns-updater

Usage

Basic usage

Let's say you want to add or update your main A/AAAA domain records exemple.tk with your current ip (v4/v6). Simply type :

fdu record update $LOGIN $PASSWORD exemple.tk

Note that if you don't have a ipv6 access, the tool will detect that and will update only the A record (ipv4) of example.tk.

In order to add or update the subdomain sub.example.tk:

fdu record update $LOGIN $PASSWORD example.tk -n sub

Advanced usage

If you want to update multiple (sub)domains you could call the tool for each domains. Even better, you can create a configuration file.
A configuration is a YAML file, which look like :

login: [email protected]
password: yourpassword

# list here the records you want to add/update
record:
  # the following will update both the A and AAAA records with your current ips (v4 and v6).
  # Note that if you don't have a ipv6 connection, the program'll detect it and will only update the A record (ipv4)
  - domain: test.tk

  # the following will update both your subdomain's A and AAAA records with your current ips (v4 and v6)
  - domain: test.tk
    name: mysubdomain

  # here's more advanced exemples

  # the following will update the AAAA record with a specified ipv6
  - domain: test2.tk
    name: # you can omit this line
    type: AAAA
    target: "fd2b:1c1b:3641:1cd8::" # note that you have to quote ipv6 addresses
    ttl: 24440

  # the following will update your subdomain's A record with your current ip (v4)
  - domain: test2.tk
    name: mysubdomain
    type: A
    target: auto # you can omit this line


  # you can omit the record type and give only ipv4 or ipv6 addresses.
  - domain: test2.tk
    name: ipv6sub
    target: "fd2b:1c1b:3641:1cd8::"

  - domain: test2.tk
    name: ipv4sub
    target: "64.64.64.64"

In order to use such configuration, you can use the following command :

fdu update /path/to/config

Where /path/to/config can be either:

  • A path to a file (default location is /etc/freenom.yml)
  • A http url (a raw secret gist for instance)

Schedule

In order to launch regularly an update, you can launch the tool with :

fdu process -c -i -r -t 3600 /path/to/config

Where the params are :

param description
-c cache the ip and update only if there is any changes
-i ignore errors when updating
-r renew the domains
-t time (in second) to wait between two updates
/path/to/config a path or a url to a configuration file

Using systemd

For ease of use a systemd unit file is available along the source code.

  • Save your configuration into /etc/freenom.yml
  • Copy the systemd/system/freenom-dns-updater.service into a valid systemd unit folder (/usr/lib/systemd/system/ for instance).
  • finally enable the service using
systemctl enable freenom-dns-updater
systemctl start freenom-dns-updater

Using other Os / services manager

There's two straightforward choices :

  • Launch the previous fdu process command
  • Schedule the fdu update command using cron, windows' scheduled task, ...

Known issues

  • The website my.freenom.com is not really stable (503/504 errors very often) => there's 3 retry on every request made by the tool but even with this it's common to face a remote server error

Docker image

If you want to run this tool in an "isolated" environment there's a docker image available at maxisoft/freenom-dns-updater

Ipv6

Note that if you want to use the ipv6 functionality, you have to enable the docker ipv6 stack

Examples

  • Update dns records using a gist config file :
docker run -it --rm maxisoft/freenom-dns-updater fdu update https://gist.githubusercontent.com/maxisoft/1b979b64e4cf5157d58d/raw/freenom.yml
  • Run the tool in a background docker with a local config file :
docker run -d --rm -v /path/to/config:/etc/freenom.yml maxisoft/freenom-dns-updater
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].