NginxProxyManager / nginx-proxy-manager

Docker container for managing Nginx proxy hosts with a simple, powerful interface
https://nginxproxymanager.com
MIT License
22.29k stars 2.58k forks source link

Dahua IP camera and nginx reverse proxy #3771

Open marsonpl opened 4 months ago

marsonpl commented 4 months ago

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?

bluekitedreamer commented 4 months ago

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

marsonpl commented 4 months ago

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?

bluekitedreamer commented 4 months ago

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

marsonpl commented 4 months ago

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.

clock145 commented 3 months ago

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