Post

V2 (BETTER) Free Secure Remote HIKVision (or any other brand) NVR Access Using Tailscale & NGINX Reverse Proxy

Better way that I have found for secure remote access to your NVR’s

This is assuming you have a computer/server at home that can stay on, and that can run docker (pretty much anything)

Requirements

  1. Computer / Server with docker OR without docker but you have to build nginx yourself
  2. The NVR you want to proxy (obviously 🀣)

Steps

The base of this method is to use NGINX as a reverse proxy that proxys’ TCP connections. NGINX has support for this, but requires the binary to be built with the –with-stream flag. Luckily for you, I have already forked and updated the needed dockerfile, lets start.

Start by cloning my forked repo:

1
2
3
git clone https://github.com/ywaf/nginx-stream

cd nginx-stream

Now, lets edit our nginx.conf settings

You will need to know your NVR’s IP Address AND port, for hikvision this is 8000

listen 8099;

is the port that your nvr will be proxied TO on the server. Can change or leave.

proxy_pass 192.168.88.13:8000;

Change this to your NVR’s IP Address and port.

Close and save the file. If you changed the listen port then remember to change it inside the docker-compose.yml file. (syntax for ports: host:container)

Now lets run the container:

1
sudo docker compose up -d

If everything worked, you should be able to access your NVR through the mobile app by pointing it to your tailscale (or other SDN (zerotier, netmaker, etc..)) IP address, and the listen port you specified above.

This has the benefit over the other tailscale solution, of not requiring any DNS rewrites AND can use with any SDN.

Enjoy your secure NVR access!

This post is licensed under CC BY 4.0 by the author.