https://github.com/antoonline/bash-script-dns-propagation-checker
The script allows users to query DNS servers for a domain's record types and log the output.
https://github.com/antoonline/bash-script-dns-propagation-checker
bash dns global propagation records
Last synced: 3 months ago
JSON representation
The script allows users to query DNS servers for a domain's record types and log the output.
- Host: GitHub
- URL: https://github.com/antoonline/bash-script-dns-propagation-checker
- Owner: AntoOnline
- Created: 2023-05-02T20:26:36.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-05-08T19:28:58.000Z (about 2 years ago)
- Last Synced: 2025-01-14T08:14:08.088Z (5 months ago)
- Topics: bash, dns, global, propagation, records
- Language: Shell
- Homepage: https://anto.online
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# DNS Query Script
This script performs DNS queries for a specified domain and record type against a list of DNS servers provided in a YAML file. It uses the `dig` command to query each DNS server in the list, and returns the results of the query.
## Usage
```bash
./dns_query.sh [record_type]
```- `domain` - The domain name to query.
- `record_type` - Optional. The type of DNS record to query for. Must be one of `A`, `AAAA`, `CNAME`, `MX`, `NS`, `PTR`, `SOA`, `SRV`, or `TXT`. If not specified, the script will default to querying for `A` records.
- `dns_yaml_file` - Required. The YAML file containing the list of DNS servers to query.## Removing DNS servers
The script allows you to remove stale DNS servers from the list. To enable this feature, set the `remove_dns_server` variable to `y` in the script before running it.
```bash
remove_dns_server="n"
```If a DNS server in the list cannot be reached or returns an error for the specified domain and record type, the script will automatically remove it from the list if `remove_dns_server` is set to `y`.
## YAML file format
The list of DNS servers to query should be provided in a YAML file with the following format:
```yaml
- reverse:
ip:
provider:
country:
```- `reverse` - The reverse DNS name for the DNS server.
- `ip` - The IP address of the DNS server.
- `provider` - The name of the DNS server provider.
- `country` - The two-letter country code of the location of the DNS server.The script comes with two sample YAML files:
- `dns_servers_all.yaml` - Contains a list of DNS servers from various providers and countries.
- `dns_servers_common.yaml` - Contains a list of commonly used DNS servers.You can use one of these files as a starting point for your own list of DNS servers.
## Dependencies
This script requires the `dig` command and the `yq` tool. If `yq` is not installed, the script will prompt the user to install it.
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more information.
## Want to connect?
Feel free to contact me on [Twitter](https://twitter.com/OnlineAnto), [DEV Community](https://dev.to/antoonline/) or [LinkedIn](https://www.linkedin.com/in/anto-online) if you have any questions or suggestions.
Or just visit my [website](https://anto.online) to see what I do.