Skip to content
RemoteMikroTik

Ahmad Foysal · · 3 min read

View a CCTV Camera or DVR Behind MikroTik Without a Public IP

For CCTV installers and site owners: why port forwarding to a DVR fails on CGNAT, 4G and Starlink lines, and how to reach the camera through the MikroTik instead.

The DVR works fine on the site's Wi-Fi. From outside, the viewer app spins and fails. You forwarded port 80 and 554 on the router, maybe on the ISP's modem too, and still nothing.

Most of the time nothing is wrong with the DVR or the forward. The site's internet line has no public IP address, so connections from the internet never reach the router in the first place.

Why port forwarding to a DVR fails

Many ISPs put customers behind CGNAT: the router gets a private address and many customers share one public address. Incoming connections stop at the ISP. This is the normal case on:

  • 4G and 5G SIMs and home 5G routers
  • Starlink's standard plans
  • many fibre and broadband lines, especially where the ISP charges extra for a public IP

Not sure? Check whether you are behind CGNAT in one minute on the MikroTik.

Some camera brands offer their own cloud (P2P with a serial number or QR code). That can work, but it ties you to the brand's app and servers, and it often fails or gets slow with older DVRs. If the site already has a MikroTik, there is a simpler way.

The fix: reach the DVR through the MikroTik

With RemoteMikroTik, the MikroTik keeps an encrypted tunnel out to our server (SSTP on TCP 443, so CGNAT does not block it). A device port adds one more thing: a public port on our server that leads through that tunnel to one device behind the router.

Your phone or PC  →  vpn1.remotemikrotik.com:20000  →  tunnel  →  MikroTik  →  DVR 192.168.88.10:80

The camera does not need any software or settings. The panel adds the forwarding rule to the MikroTik for you.

Set it up

If the router is not in RemoteMikroTik yet, add it first: create an account at https://remotemikrotik.com, choose Routers → Add router, and paste the setup script into the MikroTik's terminal. Step by step.

Then:

  1. Open the router's page and find Devices behind this router.
  2. Press Add device.
  3. Enter a name (Gate DVR), the DVR's IP on the local network (for example 192.168.88.10) and its port: 80 for the web page, 554 for RTSP.
  4. Optional, and recommended: in Only from, enter your own office or home IP, so nobody else can even try to connect.
  5. Press Save. In a few seconds you get an address like vpn1.remotemikrotik.com:20000.

Open that address in a browser for the DVR's web page, or put it into your viewer app. Add a second device port for the same DVR if you need both the web page and RTSP.

Device ports are on paid plans. Pro includes some; you can add more per router under Add-ons. See device ports for details.

Before you expose a camera

A DVR reachable from the internet is a target. Do these first:

  • Change the default password on the DVR and every camera. Default logins are the first thing bots try.
  • Use Only from whenever you watch from fixed places.
  • Update the DVR's firmware if the brand still provides updates.
  • Give the DVR a fixed IP on the MikroTik (a DHCP lease made static), so the device port keeps pointing at it.

For security reasons, some ports cannot be used, such as 23 (Telnet) and 445 (file sharing).

For installers with many sites

If you install CCTV for shops, camps and homes, every site is often a different ISP, a different modem and no public IP. With one MikroTik per site in your RemoteMikroTik account:

  • every site has a fixed Winbox address for the router, and fixed addresses for its cameras
  • you see which sites are online, and with Pro Telegram tells you when a site has been offline for 10 minutes, often before the customer calls
  • Pro keeps a nightly config backup of each router

Next steps

Common questions

Does it work with Hikvision, Dahua and other brands?

It does not depend on the brand. A device port forwards one TCP port to one device, so anything you open with an IP and a port works: the DVR's web page, its RTSP stream or another TCP port the viewer app uses.

Can I use RTSP in VLC or another viewer?

Yes. Add the camera with port 554 and use the address you get, for example rtsp://vpn1.remotemikrotik.com:20000/ followed by the stream path your camera uses.

Will the brand's phone app work?

If the app lets you add a device by IP or domain and port, use the device port address there. Apps that only work through the brand's own cloud and serial number do not need this, but they also do not let you choose a port.

Does video go through RemoteMikroTik's server?

Only while you are watching through the device port address. Nothing is recorded or stored on our side.