Questions tagged [dig]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-2
votes
1answer
38 views

Passing Dig command in nmap

I have an issue to take the result of the dig command and pass it to nmap command like: for ip in 'dig mydomain.com -t ns +short' do nmap $ip done
0
votes
2answers
19 views

bash loop until dig returns

I am trying the following but it doesn't seem to give me my desired outcome, I basically want to run dig until I get a response at which point exit and continue with rest of script. until dig +answer ...
0
votes
1answer
46 views

Can `dig` show me all common record types at once?

Is there a way to have dig request (potentially over several requests) all of the common types of records for a domain at once? dig any domain.com and dig all domain.com seem to be lacking... ...
0
votes
0answers
31 views

Unbound over Tor configuration

I am trying to torify unbound by adjusting the unbound.conf to include: server: do-not-query-localhost: no forward-zone: name: "." forward-addr: 127.0.20.1@53 forward-first: ...
0
votes
0answers
21 views

Ubuntu bind returning wrong ip adress

i setup an dns server on my ubuntu system using bind9 i followed an online tutorial which let me do this : named.conf.local I added: zone "bluemoon.be" { type master; file "/etc/bind/db....
0
votes
1answer
93 views

Dig connection timed out while Ping and nslookup work fine

Whenever I run the command dig, the connection times out and no servers are reached.Specifying the DNS server to query makes no difference. Nslookup and Ping on the other hand seem to be working just ...
0
votes
0answers
361 views

Setting up TXT records in dnsmasq does not work

I want to configure some TXT records in my local dnsmasq which runs on a singleboardcomputer and servers DHCP and DNS in my local network. I use it to make my services that I selfhost at home ...
0
votes
1answer
146 views

`dig -4` returns IPv6 address

Why would dig -4 return an IPv6 address? % dig -v DiG 9.16.5 % % dig -4 @8.8.8.8 TXT o-o.myaddr.l.google.com | grep TXT ; <<>> DiG 9.16.5 <<>> -4 @8.8.8.8 TXT o-o.myaddr.l....
1
vote
0answers
326 views

Debugging slow & timed out DNS queries

Web pages occasionally fail to load or take a very long time; Chrome will say the error is DNS_PROBE_FINISHED_BAD_CONFIG or DNS_PROBE_FINISHED_NXDOMAIN. I have been able to reproduce this on the ...
0
votes
1answer
43 views

Understanding the dig's DNS query: Does dig set non zero value for Z field?

When I was scrutinizing the DNS query sent by the dig, I found something odd from what RFC's state. I don't know the different variants of DNS protocols out there, but from RFC 1035 Z : Reserved ...
0
votes
1answer
188 views

How do I write dig output to /etc/hosts file?

I'm a shell beginner and here's an example, I don't know how to implement it. Any help, thanks in advance! Step 1: Get the domain resolution A record via dig. dig @8.8.8.8 liveproduseast.akamaized....
3
votes
2answers
257 views

Why does dig +trace take seconds to complete?

The sum of the DNS queries for the following dig command take less than 200 ms to complete, but the entire command takes over 4 seconds. Why does dig +trace take so much longer than the sum of the DNS ...
0
votes
1answer
259 views

ping can resolve hostname, while dig is unable to resolve the same hostname?

ping can resolve hostname, while dig is unable to resolve the same hostname? I'm experiencing a strange issue, where ping is able to resolve some DNS hostname, while dig cannot. I've tried to dig +...
2
votes
4answers
362 views

Read file and print out ip-address to another file

I have big file that holds something like 40000 rows of domain names. I would like to read that file and use dig (or something else) to look up the IP addresses of the domain names in the DNS, and ...
2
votes
1answer
682 views

dnsmasq behaving strangely: dig returns result for dns lookup, yet ping reports “host not found”

Since my router does not resolve hostnames of LAN devices, I setup my server to act as a DNS using DNSMASQ. DNS Server Specs ---------------- OS: Ubuntu Server LAN IP: 192.168.1.4 I have a ...
0
votes
5answers
2k views

Script to query a list of domains for MX records then query the answers for the IP addresses?

I need to check mail servers' IP addresses from a list of domains to see if they match a certain IP address. Specifically: Build a list of the domains I want to query Dig the MX record(s) of each ...
5
votes
1answer
429 views

Going all-in on DNSSEC

I have been doing an effort to go full on DNSSEC on my system with the following setup: dnscrypt-proxy installed, up and running on 127.0.0.1 with require_dnssec = true systemd-resolved running, with ...
5
votes
2answers
3k views

Unable to run DNS queries when response is bigger than 512 Bytes and truncated

Situation: Linux machine running in Azure looking for a public domain that returns 112 results the packet response size is 1905 bytes Case 1: interrogating google DNS 8.8.8.8 - it returns un-...
2
votes
3answers
1k views

Extract A record and query time from dig output

I am having the following output when executing a dig command : dig @1.1.1.1 google.com +noall +answer +stats ; <<>> DiG 9.11.4-P1 <<>> @1.1.1.1 google.com +noall +answer +...
0
votes
1answer
269 views

How to get dig without bind

Is there a way of installing dig or nslookup without BIND (preferably without compilation)? BIND is known to be a huge security hole, and all I need is the ability to resolve domain names to their A ...
0
votes
0answers
43 views

Can reach local DNS, but remote not

I'm getting nowhere with the following problem: When using my local ISPs DNS server at 192.168.0.1 (for example putting it into /etc/resolv.conf or using it directly with dig google.com @192.168.0.1) ...
0
votes
0answers
25 views

How to query Docker nameservers?

When I try to update my Ubuntu 18.04,I encounter problems Err:13 https://get.docker.com/ubuntu docker InRelease ...
1
vote
1answer
4k views

Dig: connection timed out; no servers could be reached. But ping works?

When I try to run the dig command against either my servers IP or nameserver I get an error: root@kali2:/etc# dig q-type=soa @192.168.100.10 ; <<>> DiG 9.11.4-P2-3-Debian <<>&...
0
votes
2answers
181 views

Using grep and logical operators for pattern matching within shell script

Im trying to develop a script that finds a specific pattern in the output of the dig command running against a list of domains. To do this I'm using grep but having difficulty implementing this using ...
0
votes
1answer
606 views

Why does dig utility hang indefinitely even with timeout specified?

I'm using dig utility to find public IP address. The command I used is: dig +short myip.opendns.com @resolver1.opendns.com but I had problem since on some other computers it took so long, so I ...
0
votes
1answer
345 views

Using socat, how to send to and receive from a public DNS server?

In a file called "query.bin" we have stored the data that is transmitted to a public DNS server by the following command. dig +notcp hello.com @8.8.8.8 How can query.bin now be sent to 8.8.8.8 again ...
2
votes
0answers
3k 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 +...
4
votes
2answers
2k 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
269 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....
4
votes
1answer
2k 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)
1
vote
1answer
2k 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 ...
9
votes
2answers
13k 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....
14
votes
5answers
54k 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:~$ ...
1
vote
1answer
102 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
1k 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
626 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 ...
5
votes
2answers
4k 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
565 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
402 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 ...
17
votes
2answers
13k views

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

I needed to automatically get my own WAN-IP-address 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
277 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
241 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
164 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
3answers
5k 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....
25
votes
1answer
42k 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 ...
2
votes
1answer
967 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
1k 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 ...
1
vote
5answers
4k views

Bulk Reverse DNS query with DIG

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 @NAMESERVER -x 10....
1
vote
2answers
3k 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
7k 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 ...