Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [dig]

The tag has no usage guidance.

0
votes
0answers
114 views

nslookup: return only IP address

My research indicated nslookup was never really intended for scripted use: use dig instead, which with the +short option produces machine-readable output according to the query parameters. dig +...
1
vote
2answers
95 views

How shall I understand the output of `dig`?

How shall I understand the output of dig? A DNS server stores a database of resource records. Does dig return the resource records in the database of some DNS server? If yes, which DNS server's ...
1
vote
1answer
50 views

dnsmasq running in namespace can't take queries from within namespace

I've set up a default dnsmasq.conf with essentially no modifications except: listen-address=192.168.42.2 interface=veth1 # Also tried without server=8.8.8.8 And my /etc/hosts looks like this: 127.0....
1
vote
1answer
515 views

resolve my ip with dig returns empty string

When trying to resolve my public IP address I get an ampty string ip=$(dig +short myip.opendns.com @resolver1.opendns.com)
0
votes
1answer
646 views

Why doesn't dig myip.opendns.com @resolver1.opendns.com use sshuttle's proxy?

I am using the great technique from How can I get my external IP address in a shell script? to find my public IP address: dig +short myip.opendns.com @resolver1.opendns.com I'm also using sshuttle ...
2
votes
2answers
3k views

how to extract just the IP address from a DNS query

I'd like to know how to extract just the IP address from a DNS / dig query. The query I'm running looks like this: lab-1:/var/# dig +answer smtp.mydomain.net +short smtp.ggs.mydomain.net 10.11....
9
votes
3answers
21k views

Why doesn't systemd-resolved use my local DNS server?

I'm using a local BIND9 server to host some local dns records. When trying to dig for a local domain name I can't find it if I don't explicitly tell dig to use my local BIND9 server. user@heimdal:~$ ...
0
votes
1answer
62 views

Open connections with unresolvable domain

Output of sudo watch lsof -i and sudo watch netstat -tp show ESTABLISHED connections with unresolvable domain (e.g., host, dig woldn't resolve, trying to access domain directly via URL from firefox ...
1
vote
1answer
755 views

Resolve local host without any DNS server?

Is there any way to resolve local host without any DNS server? Below is my config # ifconfig eth4 Link encap:Ethernet HWaddr 00:50:56:9C:4D:2F inet6 addr: 2004:c0a8:5b01:1:250:56ff:...
1
vote
0answers
361 views

bind fails to resolve FQDN from root hints file

I'm trying to re-lean how to set up a bind named server after many years. I set up a simulated local LAN and ISP using GNS3. I have an internal and external view for DNS. no errors in zone ...
2
votes
2answers
2k views

dig / nslookup cannot resolve, but ping can

I'm experimenting with a Win10 IoT board that runs a web interface on minwinpc.local. This works fine in the browser, and also when I use ping. However, when I use dig or nslookup, I cannot get ...
0
votes
1answer
348 views

DNS caching problem

I have a DNS server, where I put A record with TTL set to 0: example.host.com <some.ip.addr.one> Then I do dig example.host.com And get specified ip address. Later I change update record ...
0
votes
1answer
284 views

How to unescape semicolon output in double quoted dig/nslookup output?

When querying for a TXT DNS record that contains a semicolon (;) using both dig and nslookup version 9.8.3-P1, its output of the text record is in double quoted output format: Non-authoritative ...
4
votes
2answers
6k views

How does dig find my WAN-IP-adress? What is “myip.opendns.com” doing?

I needed to automatically get my own WAN-IP-adress from my router. I found this question and, among others, a solution with dig was proposed: dig +short myip.opendns.com @resolver1.opendns.com It ...
2
votes
2answers
218 views

How does root(DNS) server could answer about twitter.com?

Recently wondered how root server returns information about domains it doesn't have information about. I thought that root dns server, for example, a.root-servers.net, doesn't perform recursive ...
0
votes
2answers
175 views

How to force machines connected to an AP to use the local AP DNS?

I am sharing documents by running a hotspot in conjonction to dnsmasq that redirect all name queries to an IP <IP> where the documents can be found create_ap wlan0 wlan0 HereAreTheDocuments ...
1
vote
0answers
107 views

Fast check if custom TLD is resolvable in

In our mesh network we announce some own top level domains, each community announces its own TLD. I want to check via bash if the top level domains .ffhh, .ffki and .fffl,... can be resolved. I ...
1
vote
2answers
3k views

Unable to install bind-utils in RHEL 7.3, dependency error on bind-license

I'm trying to install dig through bind-utils on an AWS EC2 RHEL 7.3 instance, but I get a dependency error. Requires: bind-license = 32:9.9.4-37.el7 but Installed: 32:bind-license-9.9.4-38.el7_3....
8
votes
1answer
24k views

Is `dig ptr` a valid way to perform a reverse DNS query?

I know we can use dig -x to perform a reverse DNS query. I have a textbook in front of me that says that both dig ptr and dig -x are valid syntax. dig -x definitely works for me, but I'm not getting ...
1
vote
1answer
447 views

Why is dig query time slower on one computer vs another in the same LAN?

To make a long story short, I setup DNS forwarding/caching using dnsmasq built into my router (EdgeRouter). My test command is simple: dig www.example.com On one computer, which happens to be a ...
0
votes
1answer
582 views

ip domain name/FQDN using dig

When I do a dig on a hostname, in our network, it doesn't not give me the IP address, but when I add the domain name it does work or when I do a dig +search Why is the domain name a prerequisite for ...
0
votes
1answer
1k views

Bulk Reverse DNS query with DIG

Alright, I want to do a bulk reverse DNS query to a specific nameserver. Currently, after searching here and Google, I got it to work for 1 entry at the time with the following command: dig @...
1
vote
2answers
2k views

dig -x www.google.com

I'm trying to learn more about the dig command and have come across the -x option which is meant for reverse lookup, i.e. you give an IP address and get back a domain name. I tried doing dig -x www....
6
votes
2answers
3k views

Why does dig -6 google.com not work for me? [closed]

Result of dig -6 google.com: ; <<>> DiG 9.8.3-P1 <<>> -6 google.com ;; global options: +cmd ;; connection timed out; no servers could be reached What does it means if dig -4 ...
2
votes
2answers
402 views

How to dig from root to bottom?

I'm trying to fetch DNS data without any local or ISP resolvers using the DIG tool. For example I try google.nl I start at a rootserver (d.root-servers.net): dig @199.7.91.13 google.nl Then I take ...
5
votes
1answer
1k views

How do I figure out where wrong local dns results are coming from?

I'm running mint Mate 17.2. When I use dig, for a certain specific domain name, the resolved IP "answer" is wrong, and the answer server is 127.0.0.1. Trying to access this domain from my local ...
1
vote
1answer
791 views

Bash print current line, line's output, and linebreak to file

I've got a txt of a bunch of domains I need to run dig +short mx on. I've got a script set to run the command, print it to a results.txt with: ./dig_domain_mx.sh > results.txt Downside is, I ...
4
votes
1answer
1k views

Finding out what DNS server are being used

Using dig I can query a specific DNS server for some DNS records, for instance dig example.com A @192.168.1.1 Where in this instance 192.168.1.1 is my router's ip. Is there a way, using dig or any ...
1
vote
1answer
306 views

How can I get my bash script to remove the first n and last n lines from a variable?

I'm making a script to preform "dig ns google.com" and cut off the all of the result except for the answers section. So far I have: #!/bin/bash echo -n "Please enter the domain: " read d echo "You ...
2
votes
1answer
2k views

dig does not resolve unqualified domain names, but nslookup does

I have a lab set up with DNS running on a CentOS7 server (dns01.local.lab). The local.lab domain is defined in named.conf: zone "local.lab" IN { type master; file "local.lab.zone"; allow-...
1
vote
1answer
1k views

“crypto failure” error when running various commands

I'm finding that a few commands (for now dig and nslookup) that fail no matter what with the following output: 19-Jan-2016 15:01:50.219 ENGINE_by_id failed (crypto failure) 19-Jan-2016 15:01:50.219 ...
1
vote
1answer
65 views

What command line tools can be used to manually perform each step of an entire network “conversation”?

I know, I know; the phrase "network conversation" is imprecise almost to the point of meaninglessness. Let's take this specific scenario: I plug in a computer to a DHCP enabled router, open a browser ...
0
votes
2answers
249 views

How to filter IPv4 IPs in bash

How do I filter IPv4 IPs from data in bash? For example: command: dig www.ign.com A +short return: www.ign.com.edgesuite.net. a1005.g.akamai.net. 2.20.255.80 2.20.255.78 And I want to make a ...
3
votes
2answers
6k views

Force dig to forget records

I would like to let dig always forget a DNS record. I mean if I do dig yahoo.com then I have a record back in with ttl for 1790 seconds. Even if I have no cache service installed, next time i do the ...
1
vote
1answer
2k views

dig is not returning all the IP-addresses of a hostname

I'm trying to get all IP-addresses of a hostname. But dig actually just returns a subset of ips assigned to a host. For example, this hostname e.crashlytics.com is assigned to multiple cnames. Every ...
4
votes
1answer
8k views

How to enable nameserver recursion?

On Ubuntu 14.04, when I'm performing a dig google.de on my machine, I get a REFUSED status (reducing to relevant lines): me@machine:~# dig google.de ;; ->>HEADER<<- opcode: QUERY, ...
0
votes
1answer
169 views

dig domain replay SOA

I have a domain and when I use dig jeeja.biz it just gives me my server ip address. ;; ANSWER SECTION: jeeja.biz. 13914 IN A 209.15.212.171 But when I use the same command on another ...
2
votes
1answer
134 views

Dig faster than speed of light, Possible?

I personally love to dig sites that I know. .Here's a wierd thing I saw up on my terminal after running dig www-contestwinners.com:- ; <<>> DiG 9.9.5-3ubuntu0.1-Ubuntu <<>> ...
-1
votes
1answer
243 views

Explain this dig command

Please explain what this command will do and whether it can be undone: dig +nocmd strongimages.tld mx +noall +answer
2
votes
1answer
732 views

Dig command: Is the output guaranteed to be sorted?

Let's say I'm trying to lookup the IPs mail.yahoo.com, gmail.com and mail.google.com If I execute: dig @8.8.8.8 +nocomments +noquestion \ +noauthority +noadditional +nostats +nocmd \ gmail....
36
votes
2answers
43k views

dig vs nslookup

Why do the commands dig and nslookup sometimes print different results? ~$ dig facebook.com ; <<>> DiG 9.9.2-P1 <<>> facebook.com ;; global options: +cmd ;; Got answer: ;; -&...