Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Post History

75%
+4 −0
Q&A dig -6 works but dig -4 does not

I can't get a response from IPv4 dig on my server but I can get one from IPv6 dig. See the below output: $ dig +short myip.opendns.com a @resolver1.opendns.com # Doesn't return anything, this used ...

1 answer  ·  posted 4y ago by cobertos‭  ·  last activity 4y ago by Canina‭

Question linux ipv4 ipv6 dns
#4: Post edited by user avatar cobertos‭ · 2020-10-07T16:33:15Z (about 4 years ago)
  • I can't get a response from IPv4 `dig` on my server but I can get one from IPv6 `dig`.
  • See the below output:
  • ```
  • $ dig +short myip.opendns.com a @resolver1.opendns.com
  • # Doesn't return anything, this used to work!
  • $ dig +short -4 myip.opendns.com a @resolver1.opendns.com
  • ;; connection timed out; no servers could be reached
  • $ dig TXT +short o-o.myaddr.l.google.com @ns1.google.com
  • "2600:1700:846b:c8d0:98e5:2279:72f4:xxxx"
  • $ dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com
  • ;; connection timed out; no servers could be reached
  • $ dig -6 TXT +short o-o.myaddr.l.google.com @ns1.google.com
  • "2600:1700:846b:c8d0:98e5:2279:72f4:xxxx"
  • $ dig +short @8.8.8.8 google.com
  • ;; connection timed out; no servers could be reached
  • $ dig +short @2001:4860:4860::8888 google.com
  • 172.217.4.46
  • ```
  • What the heck is going on?
  • I did just switched ISPs, Comcast cable => AT&T fiber and from a cable modem + router to AT&T bundled modem & router. I've never used IPv6 before this and all the IPv4 stuff worked previously for my dynamic DNS scripts from the computer I'm running this on. I'm not sure where to start looking.
  • EDIT:
  • It looks like `resolv.conf` has the old default gateway (192.168.0.1) as the IPv4 DNS server.
  • ```
  • $ systemd-resolve --status
  • # ...
  • Link 3 (wlp2s0)
  • Current Scopes: none
  • LLMNR setting: yes
  • MulticastDNS setting: no
  • DNSSEC setting: no
  • DNSSEC supported: no
  • DNS Servers: 2600:1700:846b:c8d0::1
  • DNS Domain: attlocal.net
  • Link 2 (enp0s31f6)
  • Current Scopes: DNS
  • LLMNR setting: yes
  • MulticastDNS setting: no
  • DNSSEC setting: no
  • DNSSEC supported: no
  • DNS Servers: 192.168.0.1
  • 2600:1700:846b:c8d0::1
  • DNS Domain: ~.
  • attlocal.net
  • ```
  • Using `dig @192.168.0.254 google.com` returns the correct value. I have no idea why it didn't change by itself. I'm just not sure how to fix it without rebooting.
  • Also here's the output of ip -4 route
  • ```
  • $ ip -4 route
  • default via 192.168.0.1 dev enp0s31f6 proto dhcp metric 20100
  • 172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
  • 172.18.0.0/16 dev br-7268d2f28da2 proto kernel scope link src 172.18.0.1
  • 172.19.0.0/16 dev br-efe27a1d50a1 proto kernel scope link src 172.19.0.1
  • 172.20.0.0/16 dev br-31f1b3063ac5 proto kernel scope link src 172.20.0.1
  • 172.21.0.0/16 dev br-6c1ef2342a51 proto kernel scope link src 172.21.0.1
  • 172.22.0.0/16 dev br-fca56dd8a950 proto kernel scope link src 172.22.0.1
  • 172.25.0.0/16 dev br-6ee15f69026c proto kernel scope link src 172.25.0.1
  • 172.26.0.0/16 dev br-2894a4b9fb39 proto kernel scope link src 172.26.0.1
  • 192.168.0.0/24 dev enp0s31f6 proto kernel scope link src 192.168.0.230 metric 10
  • 0
  • 192.168.240.0/20 dev br-92e43c867623 proto kernel scope link src 192.168.240.1
  • ```
  • ```
  • $ traceroute -4n 8.8.8.8
  • traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets
  • 1 192.168.0.230 3061.133 ms !H 3061.064 ms !H 3061.023 ms !H
  • ```
  • I can't get a response from IPv4 `dig` on my server but I can get one from IPv6 `dig`.
  • See the below output:
  • ```
  • $ dig +short myip.opendns.com a @resolver1.opendns.com
  • # Doesn't return anything, this used to work!
  • $ dig +short -4 myip.opendns.com a @resolver1.opendns.com
  • ;; connection timed out; no servers could be reached
  • $ dig TXT +short o-o.myaddr.l.google.com @ns1.google.com
  • "2600:1700:846b:c8d0:98e5:2279:72f4:xxxx"
  • $ dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com
  • ;; connection timed out; no servers could be reached
  • $ dig -6 TXT +short o-o.myaddr.l.google.com @ns1.google.com
  • "2600:1700:846b:c8d0:98e5:2279:72f4:xxxx"
  • $ dig +short @8.8.8.8 google.com
  • ;; connection timed out; no servers could be reached
  • $ dig +short @2001:4860:4860::8888 google.com
  • 172.217.4.46
  • ```
  • What the heck is going on?
  • I did just switched ISPs, Comcast cable => AT&T fiber and from a cable modem + router to AT&T bundled modem & router. I've never used IPv6 before this and all the IPv4 stuff worked previously for my dynamic DNS scripts from the computer I'm running this on. I'm not sure where to start looking.
  • EDIT:
  • It looks like `resolv.conf` has the old default gateway (192.168.0.1) as the IPv4 DNS server.
  • ```
  • $ systemd-resolve --status
  • # ...
  • Link 3 (wlp2s0)
  • Current Scopes: none
  • LLMNR setting: yes
  • MulticastDNS setting: no
  • DNSSEC setting: no
  • DNSSEC supported: no
  • DNS Servers: 2600:1700:846b:c8d0::1
  • DNS Domain: attlocal.net
  • Link 2 (enp0s31f6)
  • Current Scopes: DNS
  • LLMNR setting: yes
  • MulticastDNS setting: no
  • DNSSEC setting: no
  • DNSSEC supported: no
  • DNS Servers: 192.168.0.1
  • 2600:1700:846b:c8d0::1
  • DNS Domain: ~.
  • attlocal.net
  • ```
  • Using `dig @192.168.0.254 google.com` returns the correct value. I have no idea why it didn't change by itself. I'm just not sure how to fix it without rebooting.
  • For the record, I've never touched anything to do with resolv.conf and everything should be Linux Mint default. I've never manually changed the nameservers.
  • Also here's the output of ip -4 route
  • ```
  • $ ip -4 route
  • default via 192.168.0.1 dev enp0s31f6 proto dhcp metric 20100
  • 172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
  • 172.18.0.0/16 dev br-7268d2f28da2 proto kernel scope link src 172.18.0.1
  • 172.19.0.0/16 dev br-efe27a1d50a1 proto kernel scope link src 172.19.0.1
  • 172.20.0.0/16 dev br-31f1b3063ac5 proto kernel scope link src 172.20.0.1
  • 172.21.0.0/16 dev br-6c1ef2342a51 proto kernel scope link src 172.21.0.1
  • 172.22.0.0/16 dev br-fca56dd8a950 proto kernel scope link src 172.22.0.1
  • 172.25.0.0/16 dev br-6ee15f69026c proto kernel scope link src 172.25.0.1
  • 172.26.0.0/16 dev br-2894a4b9fb39 proto kernel scope link src 172.26.0.1
  • 192.168.0.0/24 dev enp0s31f6 proto kernel scope link src 192.168.0.230 metric 10
  • 0
  • 192.168.240.0/20 dev br-92e43c867623 proto kernel scope link src 192.168.240.1
  • ```
  • ```
  • $ traceroute -4n 8.8.8.8
  • traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets
  • 1 192.168.0.230 3061.133 ms !H 3061.064 ms !H 3061.023 ms !H
  • ```
#3: Post edited by user avatar cobertos‭ · 2020-10-07T16:12:11Z (about 4 years ago)
  • I can't get a response from IPv4 `dig` on my server but I can get one from IPv6 `dig`.
  • See the below output:
  • ```
  • $ dig +short myip.opendns.com a @resolver1.opendns.com
  • # Doesn't return anything, this used to work!
  • $ dig +short -4 myip.opendns.com a @resolver1.opendns.com
  • ;; connection timed out; no servers could be reached
  • $ dig TXT +short o-o.myaddr.l.google.com @ns1.google.com
  • "2600:1700:846b:c8d0:98e5:2279:72f4:xxxx"
  • $ dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com
  • ;; connection timed out; no servers could be reached
  • $ dig -6 TXT +short o-o.myaddr.l.google.com @ns1.google.com
  • "2600:1700:846b:c8d0:98e5:2279:72f4:xxxx"
  • $ dig +short @8.8.8.8 google.com
  • ;; connection timed out; no servers could be reached
  • $ dig +short @2001:4860:4860::8888 google.com
  • 172.217.4.46
  • ```
  • What the heck is going on?
  • I did just switched ISPs, Comcast cable => AT&T fiber and from a cable modem + router to AT&T bundled modem & router. I've never used IPv6 before this and all the IPv4 stuff worked previously for my dynamic DNS scripts from the computer I'm running this on. I'm not sure where to start looking.
  • EDIT:
  • It looks like `resolv.conf` has the old default gateway (192.168.0.1) as the IPv4 DNS server.
  • ```
  • Link 3 (wlp2s0)
  • Current Scopes: none
  • LLMNR setting: yes
  • MulticastDNS setting: no
  • DNSSEC setting: no
  • DNSSEC supported: no
  • DNS Servers: 2600:1700:846b:c8d0::1
  • DNS Domain: attlocal.net
  • Link 2 (enp0s31f6)
  • Current Scopes: DNS
  • LLMNR setting: yes
  • MulticastDNS setting: no
  • DNSSEC setting: no
  • DNSSEC supported: no
  • DNS Servers: 192.168.0.1
  • 2600:1700:846b:c8d0::1
  • DNS Domain: ~.
  • attlocal.net
  • ```
  • Using `dig @192.168.0.254 google.com` returns the correct value. I have no idea why it didn't change by itself. I'm just not sure how to fix it without rebooting.
  • Also here's the output of ip -4 route
  • ```
  • $ ip -4 route
  • default via 192.168.0.1 dev enp0s31f6 proto dhcp metric 20100
  • 172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
  • 172.18.0.0/16 dev br-7268d2f28da2 proto kernel scope link src 172.18.0.1
  • 172.19.0.0/16 dev br-efe27a1d50a1 proto kernel scope link src 172.19.0.1
  • 172.20.0.0/16 dev br-31f1b3063ac5 proto kernel scope link src 172.20.0.1
  • 172.21.0.0/16 dev br-6c1ef2342a51 proto kernel scope link src 172.21.0.1
  • 172.22.0.0/16 dev br-fca56dd8a950 proto kernel scope link src 172.22.0.1
  • 172.25.0.0/16 dev br-6ee15f69026c proto kernel scope link src 172.25.0.1
  • 172.26.0.0/16 dev br-2894a4b9fb39 proto kernel scope link src 172.26.0.1
  • 192.168.0.0/24 dev enp0s31f6 proto kernel scope link src 192.168.0.230 metric 10
  • 0
  • 192.168.240.0/20 dev br-92e43c867623 proto kernel scope link src 192.168.240.1
  • ```
  • ```
  • $ traceroute -4n 8.8.8.8
  • traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets
  • 1 192.168.0.230 3061.133 ms !H 3061.064 ms !H 3061.023 ms !H
  • ```
  • I can't get a response from IPv4 `dig` on my server but I can get one from IPv6 `dig`.
  • See the below output:
  • ```
  • $ dig +short myip.opendns.com a @resolver1.opendns.com
  • # Doesn't return anything, this used to work!
  • $ dig +short -4 myip.opendns.com a @resolver1.opendns.com
  • ;; connection timed out; no servers could be reached
  • $ dig TXT +short o-o.myaddr.l.google.com @ns1.google.com
  • "2600:1700:846b:c8d0:98e5:2279:72f4:xxxx"
  • $ dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com
  • ;; connection timed out; no servers could be reached
  • $ dig -6 TXT +short o-o.myaddr.l.google.com @ns1.google.com
  • "2600:1700:846b:c8d0:98e5:2279:72f4:xxxx"
  • $ dig +short @8.8.8.8 google.com
  • ;; connection timed out; no servers could be reached
  • $ dig +short @2001:4860:4860::8888 google.com
  • 172.217.4.46
  • ```
  • What the heck is going on?
  • I did just switched ISPs, Comcast cable => AT&T fiber and from a cable modem + router to AT&T bundled modem & router. I've never used IPv6 before this and all the IPv4 stuff worked previously for my dynamic DNS scripts from the computer I'm running this on. I'm not sure where to start looking.
  • EDIT:
  • It looks like `resolv.conf` has the old default gateway (192.168.0.1) as the IPv4 DNS server.
  • ```
  • $ systemd-resolve --status
  • # ...
  • Link 3 (wlp2s0)
  • Current Scopes: none
  • LLMNR setting: yes
  • MulticastDNS setting: no
  • DNSSEC setting: no
  • DNSSEC supported: no
  • DNS Servers: 2600:1700:846b:c8d0::1
  • DNS Domain: attlocal.net
  • Link 2 (enp0s31f6)
  • Current Scopes: DNS
  • LLMNR setting: yes
  • MulticastDNS setting: no
  • DNSSEC setting: no
  • DNSSEC supported: no
  • DNS Servers: 192.168.0.1
  • 2600:1700:846b:c8d0::1
  • DNS Domain: ~.
  • attlocal.net
  • ```
  • Using `dig @192.168.0.254 google.com` returns the correct value. I have no idea why it didn't change by itself. I'm just not sure how to fix it without rebooting.
  • Also here's the output of ip -4 route
  • ```
  • $ ip -4 route
  • default via 192.168.0.1 dev enp0s31f6 proto dhcp metric 20100
  • 172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
  • 172.18.0.0/16 dev br-7268d2f28da2 proto kernel scope link src 172.18.0.1
  • 172.19.0.0/16 dev br-efe27a1d50a1 proto kernel scope link src 172.19.0.1
  • 172.20.0.0/16 dev br-31f1b3063ac5 proto kernel scope link src 172.20.0.1
  • 172.21.0.0/16 dev br-6c1ef2342a51 proto kernel scope link src 172.21.0.1
  • 172.22.0.0/16 dev br-fca56dd8a950 proto kernel scope link src 172.22.0.1
  • 172.25.0.0/16 dev br-6ee15f69026c proto kernel scope link src 172.25.0.1
  • 172.26.0.0/16 dev br-2894a4b9fb39 proto kernel scope link src 172.26.0.1
  • 192.168.0.0/24 dev enp0s31f6 proto kernel scope link src 192.168.0.230 metric 10
  • 0
  • 192.168.240.0/20 dev br-92e43c867623 proto kernel scope link src 192.168.240.1
  • ```
  • ```
  • $ traceroute -4n 8.8.8.8
  • traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets
  • 1 192.168.0.230 3061.133 ms !H 3061.064 ms !H 3061.023 ms !H
  • ```
#2: Post edited by user avatar cobertos‭ · 2020-10-07T16:10:12Z (about 4 years ago)
  • I can't get a response from IPv4 `dig` on my server but I can get one from IPv6 `dig`.
  • See the below output:
  • ```
  • $ dig +short myip.opendns.com a @resolver1.opendns.com
  • # Doesn't return anything, this used to work!
  • $ dig +short -4 myip.opendns.com a @resolver1.opendns.com
  • ;; connection timed out; no servers could be reached
  • $ dig TXT +short o-o.myaddr.l.google.com @ns1.google.com
  • "2600:1700:846b:c8d0:98e5:2279:72f4:xxxx"
  • $ dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com
  • ;; connection timed out; no servers could be reached
  • $ dig -6 TXT +short o-o.myaddr.l.google.com @ns1.google.com
  • "2600:1700:846b:c8d0:98e5:2279:72f4:xxxx"
  • $ dig +short @8.8.8.8 google.com
  • ;; connection timed out; no servers could be reached
  • $ dig +short @2001:4860:4860::8888 google.com
  • 172.217.4.46
  • ```
  • What the heck is going on?
  • I did just switched ISPs, Comcast cable => AT&T fiber and from a cable modem + router to AT&T bundled modem & router. I've never used IPv6 before this and all the IPv4 stuff worked previously for my dynamic DNS scripts from the computer I'm running this on. I'm not sure where to start looking.
  • I can't get a response from IPv4 `dig` on my server but I can get one from IPv6 `dig`.
  • See the below output:
  • ```
  • $ dig +short myip.opendns.com a @resolver1.opendns.com
  • # Doesn't return anything, this used to work!
  • $ dig +short -4 myip.opendns.com a @resolver1.opendns.com
  • ;; connection timed out; no servers could be reached
  • $ dig TXT +short o-o.myaddr.l.google.com @ns1.google.com
  • "2600:1700:846b:c8d0:98e5:2279:72f4:xxxx"
  • $ dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com
  • ;; connection timed out; no servers could be reached
  • $ dig -6 TXT +short o-o.myaddr.l.google.com @ns1.google.com
  • "2600:1700:846b:c8d0:98e5:2279:72f4:xxxx"
  • $ dig +short @8.8.8.8 google.com
  • ;; connection timed out; no servers could be reached
  • $ dig +short @2001:4860:4860::8888 google.com
  • 172.217.4.46
  • ```
  • What the heck is going on?
  • I did just switched ISPs, Comcast cable => AT&T fiber and from a cable modem + router to AT&T bundled modem & router. I've never used IPv6 before this and all the IPv4 stuff worked previously for my dynamic DNS scripts from the computer I'm running this on. I'm not sure where to start looking.
  • EDIT:
  • It looks like `resolv.conf` has the old default gateway (192.168.0.1) as the IPv4 DNS server.
  • ```
  • Link 3 (wlp2s0)
  • Current Scopes: none
  • LLMNR setting: yes
  • MulticastDNS setting: no
  • DNSSEC setting: no
  • DNSSEC supported: no
  • DNS Servers: 2600:1700:846b:c8d0::1
  • DNS Domain: attlocal.net
  • Link 2 (enp0s31f6)
  • Current Scopes: DNS
  • LLMNR setting: yes
  • MulticastDNS setting: no
  • DNSSEC setting: no
  • DNSSEC supported: no
  • DNS Servers: 192.168.0.1
  • 2600:1700:846b:c8d0::1
  • DNS Domain: ~.
  • attlocal.net
  • ```
  • Using `dig @192.168.0.254 google.com` returns the correct value. I have no idea why it didn't change by itself. I'm just not sure how to fix it without rebooting.
  • Also here's the output of ip -4 route
  • ```
  • $ ip -4 route
  • default via 192.168.0.1 dev enp0s31f6 proto dhcp metric 20100
  • 172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
  • 172.18.0.0/16 dev br-7268d2f28da2 proto kernel scope link src 172.18.0.1
  • 172.19.0.0/16 dev br-efe27a1d50a1 proto kernel scope link src 172.19.0.1
  • 172.20.0.0/16 dev br-31f1b3063ac5 proto kernel scope link src 172.20.0.1
  • 172.21.0.0/16 dev br-6c1ef2342a51 proto kernel scope link src 172.21.0.1
  • 172.22.0.0/16 dev br-fca56dd8a950 proto kernel scope link src 172.22.0.1
  • 172.25.0.0/16 dev br-6ee15f69026c proto kernel scope link src 172.25.0.1
  • 172.26.0.0/16 dev br-2894a4b9fb39 proto kernel scope link src 172.26.0.1
  • 192.168.0.0/24 dev enp0s31f6 proto kernel scope link src 192.168.0.230 metric 10
  • 0
  • 192.168.240.0/20 dev br-92e43c867623 proto kernel scope link src 192.168.240.1
  • ```
  • ```
  • $ traceroute -4n 8.8.8.8
  • traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets
  • 1 192.168.0.230 3061.133 ms !H 3061.064 ms !H 3061.023 ms !H
  • ```
#1: Initial revision by user avatar cobertos‭ · 2020-10-07T05:50:16Z (about 4 years ago)
dig -6 works but dig -4 does not
I can't get a response from IPv4 `dig` on my server but I can get one from IPv6 `dig`.

See the below output:

```
$ dig +short myip.opendns.com a @resolver1.opendns.com
# Doesn't return anything, this used to work!
$ dig +short -4 myip.opendns.com a @resolver1.opendns.com
;; connection timed out; no servers could be reached
$ dig TXT +short o-o.myaddr.l.google.com @ns1.google.com
"2600:1700:846b:c8d0:98e5:2279:72f4:xxxx"
$ dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com
;; connection timed out; no servers could be reached
$ dig -6 TXT +short o-o.myaddr.l.google.com @ns1.google.com
"2600:1700:846b:c8d0:98e5:2279:72f4:xxxx"

$ dig +short @8.8.8.8 google.com
;; connection timed out; no servers could be reached
$ dig +short @2001:4860:4860::8888 google.com
172.217.4.46
```

What the heck is going on?

I did just switched ISPs, Comcast cable => AT&T fiber and from a cable modem + router to AT&T bundled modem & router. I've never used IPv6 before this and all the IPv4 stuff worked previously for my dynamic DNS scripts from the computer I'm running this on. I'm not sure where to start looking.