Crypto Ticker:
Teknologi from nixCraft

Shell script to see Time-To-Live (TTL) for a DNS record on Linux, Unix, macOS and FreeBSD

Vivek Gite
Jul 26, 2024 at 18:05
1 Views
0 Comments
Shell script to see Time-To-Live (TTL) for a DNS record on Linux, Unix, macOS and FreeBSD
See all GNU/Linux related FAQ

TTL is an acronym for Time-To-Live (TTL) in DNS. It sets the time in seconds that a DNS record is allowed to be cached by DNS resolvers (caching server) before it needs to be fetched again from the authoritative name server. In other words, longer TTL can reduce the load on authoritative DNS servers and improve response times by keeping records in the cache longer. The shorter TTL is useful for frequently changing DNS records, as it ensures that updates are propagated quickly across the Internet. Say you want to see the Time-To-Live (TTL) value for a given DNS record for A, AAAA, and MX. Here is a sample shell script that works on Linux, Unix, and macOS. You must have the bash and dig command installed.

Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit

The post Shell script to see Time-To-Live (TTL) for a DNS record on Linux, Unix, macOS and FreeBSD appeared first on nixCraft.

Was this helpful?
Share:

Comments (0)

Please login to post a comment

No comments yet. Be the first to comment!