Hi
I have a few Hikvision cameras. I’m trying to create a rule on an NGINX proxy on letsencrypt docker to forward traffic to the cameras.
If I do a simple port forward on my router to the Camera’s IP address and port, it works, but trying the same in nginx fails.
For some reason I can forward the port 80 traffic (access to admin console, which I don’t actually want to forward from outside) but not the server traffic (port 8000 needed to access the camera via the iVMS 4500 phone app).
Do you have any idea/examples of the NGINX rules that are required?
Here is what I have so far:
server {
listen 8000;
server_name [REDACTED]
access_log /config/nginx/app.log;
error_log /config/nginx/app.error.log;
location / {
proxy_pass http://192.168.0.34:8000;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
}
}
The error_log gives me errors like this:
2019/04/05 13:00:43 [error] 348#348: *1 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.0.1, server: [REDACTED], request: "GET /ay HTTP/1.1", upstream: "http://192.168.0.34:8000/ay", host: "[REDACTED]:8000", referrer: "http://[REDACTED]:8000/"
The access_log gives me this:
185.69.144.xx - - [05/Apr/2019:14:11:57 +0100] "\x00\x00\x00\xE0Z\[REDACTED]\x00\x00\x00\x016~\x02" 400 173 "-" "-"
Any ideas?
Thanks