Stubby blocking webrtc and cloudflare tunnel (Actually nothing to do with stubby or openwrt)

Hi all,

I am using frigate nvr with go2rtc to serve the camera streams using webrtc in a debian portainer docker container within proxmox. I am also using cloudflare tunnel to overome the CGNAT imposed by my ISP for remote access into my services.

Previously I am using pihole + cloudflared proxy dns for local dns and secure dns. I would like to move those functionality onto my openwrt routers so I installed adblock lean and stubby, but it broke webrtc stream and cloudflare tunnel when I set the proxmox host and portainer dns to the openwrt router ip. Thinking it might be the proxmox host or portainer lost internet access, I tried to ping google.com and it works. Everything else on the network also works.

I couldn't find any error logs on the webrtc stream, it just shows a blank stream when I try to view my cameras using webrtc links.

For cloudflare tunnel, the following error appears:

error="Couldn't resolve SRV record &{region1.v2.argotunnel.com. 7844 1 1}: lookup region1.v2.argotunnel.com. on 127.0.0.1:53: read udp 127.0.0.1:49779->127.0.0.1:53: read: connection refused"

Everything went back to normal once I point the proxmox host and portainer dns to the pihole ip.

Any help would be greatly appreciated, thank you!

I suspect that adblock might be blocking the addresses that you request. You can try with nslookup region1.v2.argotunnel.com and get the following response:

root@barracuda:[/]#nslookup region1.v2.argotunnel.com
Server:         10.0.2.2
Address:        10.0.2.2#53

Non-authoritative answer:
Name:   region1.v2.argotunnel.com
Address: 198.41.192.227
Name:   region1.v2.argotunnel.com
Address: 198.41.192.7
Name:   region1.v2.argotunnel.com
Address: 198.41.192.27
Name:   region1.v2.argotunnel.com
Address: 198.41.192.37
Name:   region1.v2.argotunnel.com
Address: 198.41.192.47
Name:   region1.v2.argotunnel.com
Address: 198.41.192.57
Name:   region1.v2.argotunnel.com
Address: 198.41.192.67
Name:   region1.v2.argotunnel.com
Address: 198.41.192.77
Name:   region1.v2.argotunnel.com
Address: 198.41.192.107
Name:   region1.v2.argotunnel.com
Address: 198.41.192.167
Name:   region1.v2.argotunnel.com
Address: 2606:4700:a0::5
Name:   region1.v2.argotunnel.com
Address: 2606:4700:a0::6
Name:   region1.v2.argotunnel.com
Address: 2606:4700:a0::7
Name:   region1.v2.argotunnel.com
Address: 2606:4700:a0::8
Name:   region1.v2.argotunnel.com
Address: 2606:4700:a0::9
Name:   region1.v2.argotunnel.com
Address: 2606:4700:a0::10
Name:   region1.v2.argotunnel.com
Address: 2606:4700:a0::1
Name:   region1.v2.argotunnel.com
Address: 2606:4700:a0::2
Name:   region1.v2.argotunnel.com
Address: 2606:4700:a0::3
Name:   region1.v2.argotunnel.com
Address: 2606:4700:a0::4

Thank you for the reply. In the end the solution is surprisingly simple and has absolutely nothing to do with adblock-lean, stubby or openwrt :man_facepalming:

Just needed to add the dns address for the affected containers.

Update: /etc/docker/daemon.json was created during pihole+cloudflared installation to include { "dns" : [ "<pihole ip>" , "127.0.0.1" ] } which was the main cause of the issue. This caused all the containers in portainer use those dns IP. Simply rm /etc/docker/daemon.json then restart portainer and the containers should grab portainer host dns IP, which was the default behaviour.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.