nginx-proxy-manager icon indicating copy to clipboard operation
nginx-proxy-manager copied to clipboard

Dahua IP camera and nginx reverse proxy

Open marsonpl opened this issue 1 year ago • 7 comments

Hello

I have dahua IP camera and I want do access its web gui at cam.mydomain.com.

The web gui works without problem from LAN at internal IP on 192.168.1.108:8008 for now I opened the 8008 (web GUI) and 554 (RTSP) port to the outside world in my router and when I enter http://my.external.IP.address:8008 it also works however when I configure the reverse proxy host on nginx proxy manager I can login to the webui but when I click on live tab I see only white square, I assume that the issue might be an 554 port not being proxied through nginx proxy manager - any advice?

marsonpl avatar May 21 '24 19:05 marsonpl

8008 (http) and 554 (rtsp) are separate streams and need to be proxied as such.

When setting up the rtsp take note if the rtsp stream from camera is using tcp or udp. Setting up a rtsp tcp stream should be straight forward using the built in streams.

If you want to proxy a udp stream see here https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3619#issuecomment-1994355825

bluekitedreamer avatar May 22 '24 04:05 bluekitedreamer

It seems that RTSP port is not needed, I closed RTSP port on router then I ask my colleague to test it, when he enter to cam.mydomain.com the video was not displayed but if he enter the IP:8008 directly the video was shown corectly, any idea why?

marsonpl avatar May 22 '24 19:05 marsonpl

Is public DNS setup properly to the domain? have him curl the domain and see if it's hitting the right IP

bluekitedreamer avatar May 23 '24 06:05 bluekitedreamer

Yes - it is properly configured - othervise my colleague wont be able to connect to my IP camera via IP:port - he is in totally different network, I also tried it myself by using VPN and through http://ip:port it works OK when I am connected via VPN.

marsonpl avatar May 23 '24 09:05 marsonpl

mark,遇到一样的问题,我抓包看,ABC三台机器,B没有回包给A。应该是udp包,抓包软件里面看是RTP协议。

clock145 avatar Jun 06 '24 05:06 clock145

Issue is now considered stale. If you want to keep it open, please comment :+1:

github-actions[bot] avatar Dec 26 '24 02:12 github-actions[bot]

Still needed. Also see this issue.

tristan-k avatar Mar 29 '25 17:03 tristan-k

Configuring nginx as a reverse proxy for dahua, led me to same result as yours with white blocks in live stream view, but pointing a domain directly to your ip (for ex in adguardhome) the stream starts showing.

pasarenicu avatar Jun 02 '25 14:06 pasarenicu