2

I'm under ubuntu 18.04, having DNS issues, so I am using dig command to debug my DNS.

Thing is when I dig a site like redhat.com, or a well configured DNS of mine, I always get a FORMERR status, and it appears that SERVER is always set to 127.0.0.1:53.

➜  dig redhat.com                            

; <<>> DiG 9.11.3-1ubuntu1.5-Ubuntu <<>> redhat.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: FORMERR, id: 14902
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 0929f0a01195f776 (echoed)
;; QUESTION SECTION:
;redhat.com.            IN  A

;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Mar 19 11:17:10 CET 2019
;; MSG SIZE  rcvd: 51
Julien
  • 131
  • 1
  • 2
  • 7

1 Answers1

6

I fixed it adding +noedns to the command:

$ dig +noedns redhat.com  

; <<>> DiG 9.11.3-1ubuntu1.5-Ubuntu <<>> +noedns redhat.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47501
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;redhat.com.            IN  A

;; ANSWER SECTION:
redhat.com.     522 IN  A   209.132.183.105

;; Query time: 51 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Mar 19 13:51:28 CET 2019
;; MSG SIZE  rcvd: 44

Hope it helps !

Julien
  • 131
  • 1
  • 2
  • 7