Solved unbound not working over IPv4

Solved issue

CaffeineAddict

Active Member
Joined
Jan 21, 2024
Messages
111
Reaction score
54
Credits
1,025
This is my config file which is /etc/unbound/unbound.conf.d/unbound.conf

Code:
server:
    #interface: enp2s0
    #interface: 0.0.0.0
    port: 53
    #access-control: 192.168.8.0/24 allow
    hide-identity: yes
    hide-version: yes
    use-syslog: yes
    cache-max-ttl: 14400
    cache-min-ttl: 900
    prefetch: yes
    rrset-roundrobin: yes
    do-tcp: yes
    do-ip4: yes
    do-udp: yes
    #do-ip6: no
    tls-upstream: yes
    tls-cert-bundle: "/etc/ssl/certs/ca-certificates.crt"

forward-zone:
    name: "."
    forward-tls-upstream: yes
    forward-addr: 1.1.1.1@853#one.one.one.one
    #forward-addr: 2a05:fc84::42@853#dns.digitale-gesellschaft.ch

dig @::1 example.com
Works fine which is the same as
dig @localhost example.com

dig @127.0.0.1 example.com
Does not work

If I uncomment "interface" and set it to
interface: ::1
It will work as if not specified, which is IPv6 by default

If I set interface to IPv4 it won't work, ex.
interface: 127.0.0.1
does not make IPv4 work
also
interface: 0.0.0.0
does not make IPv4 work

No matter what I do dns over IPv4 does not work.
If I uncomment line in config "do-ip6: no" then unbound doesn't work at all which is a prof that it works only via IPv6
Specifying different dns server makes no difference.

I'm using debian 12 and the reason I need dns over IPv4 is to be able to specify dns address in network manager trough UI which edits the /etc/resolv.conf
For ex in the window below, "DNS Servers" asks me to enter IPv4 DNS address (I don't have IPv6 connectivity):
Screenshot_20240121_155754.png



EDIT:

I figured out the issue was because nftables was configured to drop IPv4 but not IPv6.
 
Last edited:


EDIT:

I figured out the issue was because nftables was configured to drop IPv4 but not IPv6.

That's good to hear

Glad you got it solved
 

Members online


Latest posts

Top