DEV Community

4 2

Bypass Transparent DNS Proxy

Since some days ago, I can not update my Devuan box. The error is "Temporary failure in name resolution". This is strange provided that Brave Browser can access deb.devuan.org. Later, I figured out that my ISP (Indihome - https://www.indihome.co.id/) uses transparent DNS proxy and Brave Browser has Secure DNS (also known as DNS Over HTTPS) so I can access deb.devuan.org from Brave Browser, but I can not access deb.devuan.org from command line.

This is why eventhough I use 8.8.8.8 in my /etc/resolv.conf, all request to DNS server is intercepted by them and then the request will be directed to ISP for whatever they want. This is unacceptable behaviour but well, complaints won't be heard, so I choose to use DNS over https.

I search for tools and found dns-over-https. This tool uses Go (1.13 or newer) so it's not a big deal for me since I already use Go. Just clone the repo and compile and then execute doh-client (Go should be available on your system):

$ git clone https://github.com/m13253/dns-over-https
$ cd dns-over-https
$ make
Enter fullscreen mode Exit fullscreen mode

I don't use systemd, So just go to doh-client and run it:

$ cd doh-client
$ ./doh-client
Enter fullscreen mode Exit fullscreen mode

Change /etc/resolv.conf to use 127.0.0.1 as nameserver:

nameserver 127.0.0.1
Enter fullscreen mode Exit fullscreen mode

Then I can use apt from shell like before.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay