# How to Check for IPv4 and IPv6 Support on NTS Servers

> Easily check IPv4 and IPv6 support on NTS servers using nts-sources.yml scripts or DNS lookups. Verify network time security connectivity efficiently.

- Repository: [Jauder Ho/nts-servers](https://github.com/jauderho/nts-servers)
- Tags: how-to-guide
- Published: 2026-03-04

---

**You can verify IPv4 and IPv6 support for Network Time Security (NTS) servers by inspecting the `notes` field in [`nts-sources.yml`](https://github.com/jauderho/nts-servers/blob/main/nts-sources.yml), using the provided [`ntsCheck.sh`](https://github.com/jauderho/nts-servers/blob/main/ntsCheck.sh) or [`verifyNTSServers.py`](https://github.com/jauderho/nts-servers/blob/main/verifyNTSServers.py) scripts, or performing manual DNS lookups to test connectivity.**

The **jauderho/nts-servers** repository maintains a curated list of public NTS servers in a structured YAML format. Each server entry documents IP-family support in human-readable notes, while companion scripts enable automated verification against live DNS records. Understanding how to check for IPv4 and IPv6 support on NTS servers ensures your time synchronization infrastructure maintains resilient dual-stack connectivity.

## Inspect the Server List in [`nts-sources.yml`](https://github.com/jauderho/nts-servers/blob/main/nts-sources.yml)

The authoritative source for IP-family support documentation resides in **[`nts-sources.yml`](https://github.com/jauderho/nts-servers/blob/main/nts-sources.yml)** at the repository root. Each server entry contains a **`notes`** field that explicitly states whether the host supports IPv4, IPv6, or both protocols.

Repository entries follow a consistent pattern. For example, the server *time1.mbix.ca* includes the annotation `notes: IPv4 and IPv6` in lines 89-91 of [`nts-sources.yml`](https://github.com/jauderho/nts-servers/blob/main/nts-sources.yml). Similar documentation appears throughout the file at lines 96, 103, 116, 141, 184, 335, 342, 398, 405, and 412. You can quickly scan for specific support levels using grep:

```bash
grep -i "IPv6 only" -n nts-sources.yml

# Example output: 141:   notes: IPv6 only

```

## Verify Connectivity with Repository Scripts

Beyond static documentation, the repository provides two validation scripts that perform live NTS handshakes to confirm actual connectivity.

### Check Individual Servers with [`ntsCheck.sh`](https://github.com/jauderho/nts-servers/blob/main/ntsCheck.sh)

The **[`scripts/ntsCheck.sh`](https://github.com/jauderho/nts-servers/blob/main/scripts/ntsCheck.sh)** wrapper accepts a hostname or IP address and executes a single NTS query via `chronyd`. The script uses the default system resolver, which will prefer IPv4 or IPv6 depending on the DNS response. A "Good" result indicates a successful NTS handshake over the resolved address family.

```bash
./scripts/ntsCheck.sh time1.mbix.ca

# Output shows chronyd query result – “Good” means the NTS handshake succeeded.

```

### Batch Validation with [`verifyNTSServers.py`](https://github.com/jauderho/nts-servers/blob/main/verifyNTSServers.py)

For comprehensive testing, **[`scripts/verifyNTSServers.py`](https://github.com/jauderho/nts-servers/blob/main/scripts/verifyNTSServers.py)** iterates over every entry in [`nts-sources.yml`](https://github.com/jauderho/nts-servers/blob/main/nts-sources.yml). The script extracts plain hostnames from possible markdown links and runs the same `chronyd` command for each server, reporting success or failure for the resolved address family.

```bash
python3 scripts/verifyNTSServers.py nts-sources.yml

# The script prints “Verifying <hostname> … Good/Failed” for each entry.

```

The Python implementation processes the YAML structure between lines 22-33, handling hostname extraction and subprocess execution to validate the entire list efficiently.

## Manual DNS Lookup Methods

You can independently verify IP-family support by querying DNS records directly. Successful responses for both record types indicate dual-stack advertisement, matching the `notes` field documentation.

```bash

# IPv4 (A record)

dig +short A time1.mbix.ca

# IPv6 (AAAA record)

dig +short AAAA time1.mbix.ca

```

If a server only resolves to an IPv6 address, the IPv4 query will return empty results, and vice-versa. This behavior correlates directly with the support level declared in the YAML metadata.

## Programmatically Parse Support Information

For automation or integration with monitoring systems, parse the YAML structure to extract IP-family support programmatically:

```python
import yaml, re

def extract_support(entry):
    notes = entry.get("notes", "").lower()
    if "ipv4" in notes and "ipv6" in notes:
        return "both"
    if "ipv6" in notes:
        return "ipv6"
    if "ipv4" in notes:
        return "ipv4"
    return "unspecified"

data = yaml.safe_load(open("nts-sources.yml"))
for srv in data["servers"]:
    print(srv["hostname"], extract_support(srv))

```

This approach enables you to filter the server list by protocol support before deploying configuration to your NTP clients.

## Summary

- The **[`nts-sources.yml`](https://github.com/jauderho/nts-servers/blob/main/nts-sources.yml)** file documents IPv4 and IPv6 support in the `notes` field of each server entry.
- **[`scripts/ntsCheck.sh`](https://github.com/jauderho/nts-servers/blob/main/scripts/ntsCheck.sh)** provides single-host validation using `chronyd` to verify live connectivity.
- **[`scripts/verifyNTSServers.py`](https://github.com/jauderho/nts-servers/blob/main/scripts/verifyNTSServers.py)** automates batch testing across the entire server list.
- Manual **`dig`** commands for A and AAAA records confirm DNS advertisement of address families.
- The Python parsing example demonstrates how to extract support metadata programmatically for configuration management.

## Frequently Asked Questions

### Where does the repository store IPv4 and IPv6 support information?

The `notes` field within [`nts-sources.yml`](https://github.com/jauderho/nts-servers/blob/main/nts-sources.yml) contains explicit strings such as "IPv4 and IPv6", "IPv4 only", or "IPv6 only" for each server entry. This human-readable metadata appears on lines 89-91, 141, and throughout the file for various hosts.

### How do I test if a specific NTS server supports both protocols?

Run `./scripts/ntsCheck.sh <hostname>` to test the default resolved address, then force specific IP versions using `chronyd` with `-4` or `-6` flags, or query DNS directly with `dig A` and `dig AAAA` to see which records exist. If both queries return addresses, the server advertises both families.

### Can I verify the entire server list automatically?

Yes. Execute `python3 scripts/verifyNTSServers.py nts-sources.yml` to test every server in the repository. The script parses the YAML, extracts hostnames, and runs NTS queries to report which servers respond successfully.

### What does it mean if the notes field says "IPv6 only" but I can reach the server via IPv4?

The `notes` field documents the intended or verified support level at the time of entry. If DNS resolution reveals conflicting information, the server configuration may have changed. Use the provided scripts or manual `dig` lookups to validate current behavior against the documented metadata.