Script and library to wait for a DNS authority server to get its configuration.

Related tags

Networking dnswait
Overview

DNSWait

dnswait is a small script to wait for the "propagation" of a namserver configuration.

Installing

It's as easy as:

python -m pip install dnswait

There's no such thing as DNS propagation

What make your browser don't hit your server right after you've configured the zone, this long frustrating delay from hours to days, is the effect of caches, not "propagation".

Try it yourself next time you set up a new entry: just don't hit it before configuring it, so its absence is not stored in any caches. Only when configured try it and boom, cache miss all the way up, no delay, it just works.

There may be some time though between the moment you ask your registrar to set an entry (via their web user interface or their API) and the moment it's really visible on their nameservers, that time I agree to call "propagation", and that's what's being monitored by this script.

Usage

Say you've added a TXT record containing itsme to proove you're the owner of example.com, via the interface of a low-cost hosting company, and they display a nice message:

Please wait a few minutes for our scripts to propagate the change to our DNS servers.

Then you can run:

dnswait example.com TXT itsme

the script will wait for all the authoritative servers of example.com to serve itsme for your text entry, so you know exactly what those few minutes were, you don't have to guess.

Another example

Say you're the owner of mdk.fr (it's me) and your provider only allows you to change DNS records using issues on their bug tracker, then submit the issue asking them to set 51.15.187.166 as the IP for mdk.fr and run:

dnswait mdk.fr A 51.15.187.166 && notify-send "Hey they configured mdk.fr!"

so you'll know when it's done.

(If they reply "it's done" while dnswait don't see it, they probably messed up...)

Using in shell scripts

If you have a shell script updating DNS configuration via an API, you can use dnswait in them to wait for the configuration to be done.

Verbose

If you want to see what's happening, run with -v or -vv:

$ dnswait mdk.fr A 51.15.187.166 -v
INFO:dnswait:3 authoritative name servers to check.
INFO:dnswait:All authoritative servers have the expected value.

or:

$ dnswait mdk.fr A 51.15.187.166 -vv
INFO:dnswait:3 authoritative name servers to check.
DEBUG:dnswait:Checking ns-69-a.gandi.net.
DEBUG:dnswait:ns-69-a.gandi.net. have the expected value!
DEBUG:dnswait:Checking ns-173-b.gandi.net.
DEBUG:dnswait:ns-173-b.gandi.net. have the expected value!
DEBUG:dnswait:Checking ns-127-c.gandi.net.
DEBUG:dnswait:ns-127-c.gandi.net. have the expected value!
INFO:dnswait:All authoritative servers have the expected value.
You might also like...
Fast and configurable script to get and check free HTTP, SOCKS4 and SOCKS5 proxy lists from different sources and save them to files

Fast and configurable script to get and check free HTTP, SOCKS4 and SOCKS5 proxy lists from different sources and save them to files. It can also get geolocation for each proxy and check if proxies are anonymous.

A TCP Chatroom built with python and TCP/IP sockets, consisting of a server and multiple clients which can connect with the server and chat with each other.

A TCP Chatroom built with python and TCP/IP sockets, consisting of a server and multiple clients which can connect with the server and chat with each other. It also provides an Admin role with features including kicking and baning of users.

This is a Client-Server-System which can share the screen from the server to client and in the other direction.

Screenshare-Streaming-Python This is a Client-Server-System which can share the screen from the server to client and in the other direction. You have

This is a Client-Server-System which can send audio from a microphone from the server to client and in the other direction.

Audio-Streaming-Python This is a Client-Server-System which can send audio from a microphone from the server to client and in the other direction. You

Test - Python project for Collection Server and API Server

QProjectPython Collection Server 와 API Server 를 위한 Python 프로젝트 입니다. [FastAPI참고]

Simple Python Script to Parse Apache Log, Get all Unique IPs and Urls visited by that IP

Parse_Apache_Log Simple Python Script to Parse Apache Log, Get all Unique IPs and Urls visited by that IP. It will create 3 different files. allIP.txt

Automated network configuration backups using Github actions and git-scraping
Automated network configuration backups using Github actions and git-scraping

Network Config Scraper This repository demonstrates the use of Github Actions and git-scraping to build an automated backup solution for network confi

 sync application configuration and settings across multiple multiplatform devices
sync application configuration and settings across multiple multiplatform devices

sync application configuration and settings across multiple multiplatform devices ✨ Key Features • ⚗️ Installation • 📑 How To Use • 🤔 FAQ • 🛠️ Setu

Find information about an IP address, such as its location, ISP, hostname, region, country, and city.
Find information about an IP address, such as its location, ISP, hostname, region, country, and city.

Find information about an IP address, such as its location, ISP, hostname, region, country, and city. An IP address can be traced, tracked, and located.

Owner
Julien Palard
@python Core Developer
Julien Palard
EchoDNS - Analyze your DNS traffic super easy, shows all requested DNS traffic

EchoDNS - Analyze your DNS traffic super easy, shows all requested DNS traffic

Oli Zimmermann 1 Jan 11, 2022
🥑 A Python ARP and DNS Spoofer CLI and INTERFACE 🥓

NEXTGEN SPOOFER ?? A Python ARP and DNS Spoofer CLI and INTERFACE ?? CLI -> advanced pentesters INTERFACE -> beginners SetUp Make sure you installed P

null 9 Dec 25, 2022
DNSStager is an open-source project based on Python used to hide and transfer your payload using DNS.

What is DNSStager? DNSStager is an open-source project based on Python used to hide and transfer your payload using DNS. DNSStager will create a malic

Askar 547 Dec 20, 2022
Build custom OSINT tools and APIs (Ping, Traceroute, Scans, Archives, DNS, Scrape, Whois, Metadata & built-in database for more info) with this python package

Build custom OSINT tools and APIs with this python package - It includes different OSINT modules (Ping, Traceroute, Scans, Archives, DNS, Scrape, Whoi

QeeqBox 52 Jan 6, 2023
Way find out if DNS is down or your instance

DNS-PING Way to find out if DNS is down or your instance Problem: At times it happens that DNS provider services of a website URL is down and so to re

Giten Mitra 4 Nov 18, 2022
ExtDNS synchronizes labeled records in docker-compose with DNS providers.

ExtDNS for docker-compose ExtDNS synchronizes labeled records in docker-compose with DNS providers. Inspired by External DNS, ExtDNS makes resources d

DNTSK 6 Dec 24, 2022
Makes dynamically updating your Cloudflare DNS records a bit easier ⏩👍😎

Easy Dynamic Cloudflare DNS Updater Makes dynamically updating your Cloudflare DNS records a bit easier ⏩ ?? ?? If using it as a 'Dynamic DNS' client,

Zac Koch 3 Dec 19, 2021
A pure python implementation of multicast DNS service discovery

python-zeroconf Documentation. This is fork of pyzeroconf, Multicast DNS Service Discovery for Python, originally by Paul Scott-Murphy (https://github

Jakub Stasiak 483 Dec 29, 2022
A great python/java dynamic DNS service for NameSilo, with log, email reminder...

English NameSilo DDNS is a DDNS service for NameSilo domain names for home broadband , it can automatically detect IP changes in home broadband

云牧青 77 Dec 28, 2022
Octodns-cloudflare - Cloudflare DNS provider for octoDNS

CloudflareProvider provider for octoDNS An octoDNS provider that targets Cloudfl

octoDNS 6 May 28, 2022