ch4 is a command-line DNS client built around the rsdns library. It is intended to expose the capabilities of rsdns through a practical command-line interface and can serve as an alternative to the widely used dig utility.
The syntax deliberately follows dig in several areas. A DNS server can be specified with the familiar @server form, while record types and domain names can be supplied as positional arguments. If no server is explicitly given, ch4 can discover the DNS servers configured by the operating system.
Queries normally use UDP, with truncated responses automatically retried over TCP. You can instead request TCP explicitly or prevent a TCP fallback when required. Recursive queries can also be enabled or disabled.
The application supports EDNS and lets you control the maximum UDP payload size. Unknown DNS record types can be represented using the generic format specified by RFC 3597, while an option is available to force that representation for all records.
For scripts and other situations where the normal detailed response is unnecessary, ch4 offers short output containing only record data. It can also save DNS responses to a file and read previously saved responses.
Other facilities include configurable query lifetimes and timeouts, a command for listing the nameservers detected from the operating system, and build information describing the version and compilation environment.
ch4 is therefore well suited to users who want a relatively familiar dig-like workflow backed by a modern Rust DNS implementation.
This is free and open source software.
Key Features
- Command-line DNS client built around the rsdns library.
- Offers substantial command-line compatibility with dig.
- Automatically detects operating system DNS servers.
- Supports UDP and TCP query strategies.
- Provides EDNS support and configurable UDP payload sizes.
- Supports RFC 3597 representation of unknown record types.
- Offers concise output containing only record data.
- Can save and reload DNS responses.
Website: github.com/r-bk/ch4
Support:
Developer: Rafael Buchbinder
License: Apache License 2.0 or MIT License
ch4 is written in Rust. Learn Rust with our recommended free books and free tutorials.
Related Software
| DNS Clients | |
|---|---|
| dog | Colourful output, understands normal command-line argument syntax |
| doggo | Command-line DNS client for humans |
| q | Tiny command line DNS client supporting UDP, TCP, DoT, DoH, DoQ and ODoH |
| ddclient | Update dynamic DNS entries |
| GoDNS | Dynamic DNS (DDNS) client tool |
| dig | DNS lookup utility |
| awl | DNS lookup tool |
| ZDNS | High-speed DNS resolver and command line utility |
| dnslookup | Make DNS lookups |
| dug | Global DNS propagation checker |
| drill | Perform DNS lookups |
| dness | Dynamic DNS client |
| In-a-Dyn | Small and simple Dynamic DNS, DDNS, client |
| dnsupdate | Modern and flexible dynamic DNS client |
| wig | Simple and lightweight DNS client |
| dyndnsc | Dynamic DNS update client |
Read our verdict in the software roundup.
Explore our carefully curated directory of recommended free and open source software, covering every major software category.The directory forms part of our extensive collection of articles for Linux enthusiasts. It includes hundreds of detailed reviews, together with free and open source alternatives to proprietary software from companies such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk. LinuxLinks also covers interesting projects worth exploring, Linux-compatible hardware, free programming books and tutorials, and much more. Know a useful free and open source Linux application that we haven’t covered? Tell us about it using our submission form. |


Please read our Comment Policy before commenting.