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.
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:
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.