dig performs DNS lookups and displays records matching the specified IP address or domain name.
Questions tagged [dig]
213 questions
0
votes
1 answer
Timeout and moving onto the next request in the script
I have a script that looks up specific records for a domain.
Ie. domain Cpanel.domain; ftp.domain; mail.domain; mx record and txt records. When a specific record is not found the script stops but does not fail or end until it is manually cancelled.…
0
votes
1 answer
Dig DNS ,sometime get right answer , sometime get wrong answer
After update the nameserver of my dns which in Godaddy, I dig the DNS's NS , sometime get right answer, sometime get wrong answer
dig +short NS licloud.greenvalleyintl.com
sometime get nothing
sometime…

sunt
- 479
- 1
- 5
- 15
0
votes
1 answer
Why does my browser resolve DNS differently from dig?
I have recently set up Heroku hosting with a domain name.
I am able to visit myappname.herokuapp.com.
When I type dig mydomain.com, I see the first record (which I pointed my CNAME to) is myappname.herokuapp.com.
When I go to whatismydns.net, I can…

Alexander Kleinhans
- 5,950
- 10
- 55
- 111
0
votes
1 answer
Sed: execute alternative command when output from previous one is empty
I wanted to modify dig command to automatically apply a reverse lookup to any A record I receive in output.
Therefore, I've created the following function:
dt ()
{
remove=$(echo $@ | sed 's^https*^^' | sed 's^[,/*:]^^g' );
dig any +trace…

Игорь Иванов
- 9
- 1
0
votes
0 answers
What am i doing wrong with this Python script?
This is my first python script (script and programming in general). I have a list of IPs that i would like to run reverse dig on each one. I found the easiest way is to write python script to do just that. The output does not look promising. Can…

ciscology
- 19
- 2
0
votes
1 answer
DIG query time average speed for multiple sites
I am working at my first script. I want to use dig to get query time for multiple sites from a .txt file and print the average.
Here's the source, I don't know how to print only query time without text.
Thanks!
#!/bin/bash
#…

Aly x
- 1
- 2
0
votes
0 answers
why dig can't interpret my own DNS server's response?
I'm trying to setup a custom DNS server. I'm using this code:
http://code.activestate.com/recipes/491264-mini-fake-dns-server/
Nslookup can interpret the DNS server's response:
➜ ~ nslookup google.com 192.168.4.243
Server: …
0
votes
1 answer
DNS lookup getting Non-existent domain error
I have two mirrored forward DNS server(for simplifying, named f1, f2) which forward some domain request to my authoritative DNS server(also named a1, a2), I added some new domain to my authoritative DNS server, but when I nslookup the new domain…

Donghua Liu
- 1,776
- 2
- 21
- 30
0
votes
1 answer
dig linux script shows results from txt file
I would like to have a script that will dig domain_name ANY from multiple domains stored on a domains.txt file and output the results to a results.txt file...but easy to read if possible
Is this thing possible?

afs
- 27
- 1
- 12
0
votes
0 answers
Obtain a token from the HTTP service
Help in answering the following, please :)
Obtain a token from the HTTP service described in the ‘_http._tcp’ record on somedomain.net. A simple GET / against the host/port described in the ‘_http._tcp’ record will provide the token. Copy and paste…
user7802257
0
votes
1 answer
Bash script dig command to just return the TTL value
I use dig +short @127.0.0.1 -p 5336 www.google.com to get the IP address that is being resolved to. I am wondering if there is a similar bash command to just get the ttl value?

gogofan
- 533
- 1
- 10
- 20
0
votes
0 answers
php explode on multiple MX records and wrong IP
I have a problem with a section of my code. I created a dig, but now I'm trying to add A record directly on the MX record (eg MX record -> IP address).
I have this code for finding A record from the MX I already found:
$comm = 'dig @' . $ns . ' MX…

adamkwn
- 49
- 9
0
votes
1 answer
How to call authoritative server for ip response?
I have cached the response received from dig command using a c code , and I want to use authorities list to call directly for finding the ip ,avoiding a part of dns lookup , but I have no idea how to do that.
;; AUTHORITY SECTION:
gogole.com. …

Buculei Razvan
- 47
- 3
0
votes
1 answer
Issue in remote db connection , probably in resolving host name ip
I am trying to connect to a remote db on '1and1' and through Php mysqli I receive this error:
php_network_getaddresses: getaddrinfo failed: Name or service not known
also trying to connect via ssh I have this error:
ssh: Could not resolve hostname…

Stefano Maglione
- 3,946
- 11
- 49
- 96
0
votes
1 answer
dig -x +short to file without STDERR
When I do:
dig -x +short
I get only the hosts output,
but when doing dig -x +short > file.txt I get all the rubbish, as if it was not executed with +short.
I have tried:
dig -x +short 2>&1 > file.txt
also
dig -x +short 2>/dev/null >…

aDoN
- 1,877
- 4
- 39
- 55