How do I intercept and modify all DNS request in chromebook.

188 views
Skip to first unread message

Raghavendra Singh

unread,
Sep 30, 2021, 8:28:27 AM9/30/21
to Chromium OS Discussion
I am developing DNS security app for chromebook, I want to intercept all DNS request and then modify the DNS request by adding some edns options then I want to send this DNS request over TLS to my DNS server.
I tried running local DNS server on 127.0.0.1:53 and then I changed the DNS server from chromebook setting, but I am not able to start local DNS server it seems port 53 is not allowed to listen.
 
I am unable to find the way to intercept and modify the DNS traffic in chromebook, please help.

Thanks in advance.

dragon788

unread,
Sep 30, 2021, 11:28:53 AM9/30/21
to raghu...@gmail.com, Chromium OS Discussion
Ports below 1024 require root access to bind, are you running in developer mode?

Do you get an error when starting the service or it just doesn't respond?

You will probably need iptables rules to allow access to that port as well.

--
--
Chromium OS Discussion mailing list: chromium-...@chromium.org
View archives, change email options, or unsubscribe:
https://groups.google.com/a/chromium.org/group/chromium-os-discuss
---
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-dis...@chromium.org.

dragon788

unread,
Sep 30, 2021, 11:46:36 AM9/30/21
to Raghavendra Singh, Chromium OS Discussion
I doubt a Chrome app (which are also going away soon) will be able to bind a port below 1024 because they are sandboxed.

If you were running a VPN app/extension I believe those can override the DNS to provide a different server/IP address.

Another workaround I've seen is using Crostini or LXC underneath it to run a container with pihole or adguard which will have an internal IP accessible from the host OS that you could route requests through.

On Thu, Sep 30, 2021, 10:36 AM Raghavendra Singh <raghu...@gmail.com> wrote:
No I am not running in developer mode, I tried running UDP server on 127.0.0.1 port 53, the socket API was returning error code.

How can I request root access in chrome app ?

Raghavendra Singh

unread,
Sep 30, 2021, 12:41:38 PM9/30/21
to Chromium OS Discussion, drag...@gmail.com, Chromium OS Discussion, Raghavendra Singh
No I am not running in developer mode, I tried running UDP server on 127.0.0.1 port 53, the socket API was returning error code.

How can I request root access in chrome app ?

On Thursday, 30 September, 2021 at 8:58:53 pm UTC+5:30 drag...@gmail.com wrote:

Raghavendra Singh

unread,
Sep 30, 2021, 3:25:51 PM9/30/21
to dragon788, Chromium OS Discussion
Crostini will not help, it is restricted in my environment.
How can I get the list of active network interface & then for active network interface I'll change the dns server.
Reply all
Reply to author
Forward
0 new messages