-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[OFF-TOPIC] [Need Help] How to use it in router which only supports IPv4 DNS? #91
Comments
Forgot to mention that, the DNS Cloudflare provided to be used in IPv4 devices, didn't work. I mean the internet was working fine, but nothing was getting filtered. I was getting ads in all my devices. |
It's better to manually configure all your devices to use the DNS settings to benefit from DoH/DoT. The DNS settings provided by Cloudflare might not've worked if you didn't link your IP address to the DNS location. This is required because we don't have an infinite amount of IPv4 addresses, so Cloudflare can't give everyone their personal IP for DNS. You can do this by clicking on the DNS location and pressing "Configure", then "Add IP" in the "Source IPv4 address" section. As an ideal alternative that doesn't use moving parts, run a tiny DNS server at home that forwards queries over to your DoH URL such as cloudflared: cloudflared proxy-dns --address 0.0.0.0 --upstream https://changeme.cloudflare-gateway.com/dns-query |
You can use IPv4 but you'll need a static IP address from your ISP, which most home ISPs don't give static IPs unless you specifically request it. Go to your After that, Cloudflare will give you 2 IPv4 addresses that you can use on your router or anything that uses IPv4. This will only work after you've added your ISP's IP address there. |
Actually, you can have Cloudflare's IPv4 DNS servers with a dynamic IP, but you will need to use the Cloudflare API to update the source IP of your default DNS location every time your WAN IP changes, as their web UI does not currently allow you to update it with the free plan. You can automate the whole process with very little effort. For reference, here's the script I'm using on my EdgeRouter to detect WAN IP changes and update CloudFlare accordingly:
CAPS need to be replaced with your own settings/secrets of course. You can schedule it to run every 1 to 5 minutes with cron; it will only run the update when it's really needed. You can run it on any Linux box you may have lying around, as long as you have a reliable way to determine your WAN IP. |
I am using Xiaomi Router 3c & Router 4c, both of which only support IPv4 DNS. Cause when I entered the IPv6 one, it gave an error saying the DNS needs to of a value 255.255.255.255 max. The script is working perfectly fine. This is first time I used node.js, npm, etc. but surprisingly managed to do it in one go. Tried the output in two of my android devices and chrome browser using the dns over tls / https DNS and all are working fine.
I just couldn't manage to make it work in my router and windows 10 PC.
My ISP is using PPPoE connection type, which assigns random IP address to my network.
If someone can guide me how can I use this DNS with my router I'll be very grateful 🙏
The text was updated successfully, but these errors were encountered: