oxen-io / lokinet

Lokinet is an anonymous, decentralized and IP based overlay network for the internet.
https://lokinet.org/
GNU General Public License v3.0
1.71k stars 220 forks source link

Support upstream IPv6 resolvers #2179

Closed zquestz closed 1 year ago

zquestz commented 1 year ago

Describe the bug Only IPv4 resolvers seem to work for the upstream setting. When I enter an IPv6 resolver the daemon no longer launches and complains about :: not being valid.

To Reproduce Put any IPv6 resolver as the upstream. I was trying to add ::1.

Device and Operating system (please complete the following information):

Latest Lokinet for Arch.

dr7ana commented 1 year ago

fixed by #2180

zquestz commented 1 year ago

Unfortunately that PR didn't fix the issue for me. When I use an IPv6 upstream resolver all DNS stops working for me.

I tried the following: [::1]:53000 and [0::1]:53000. I can confirm stubby is listening on the IPv6 port, and the IPv4 address 127.0.0.1:53000 works as expected.

majestrate commented 1 year ago

On Saturday, June 10, 2023 4:35:38 PM EDT Josh Ellithorpe wrote:

Unfortunately that PR didn't fix the issue for me. When I use an IPv6 upstream resolver all DNS stops working for me.

I tried the following: [::1]:53000 and [0::1]:53000. I can confirm stubby is listening on the IPv6 port, and the IPv4 address 127.0.0.1:53000 works as expected.

try adding to lokinet.ini dns section:

do-ip6:=yes

zquestz commented 1 year ago

Didn't seem to work.

[dns]
# DNS configuration

# Upstream resolver(s) to use as fallback for non-loki addresses.
# Multiple values accepted.
#upstream=127.0.0.1:53000
upstream=[::1]:53000

do-ip6:=yes

# Address to bind to for handling DNS requests.
bind=127.0.0.1:54000

# Add a hosts file to the dns resolver
# For use with client side dns filtering
#add-hosts=

# Can be uncommented and set to 1 to disable resolvconf configuration of lokinet DNS.
# (This is not used directly by lokinet itself, but by the lokinet init scripts
# on systems which use resolveconf)
no-resolvconf=1
zquestz commented 1 year ago

One other note, I can't seem to bind to a custom port when its IPv6.

bind=[::1]:54000 doesn't seem to function and the logs show it try to bind to port 53 and fail.