Question Accessing NVR/DVR remotely outside same network

coolkul

Honorable
Jun 29, 2014
21
1
10,515
I have access to a static IP address that was unused. I decided to test it out and plugged the static IP address, subnet mask, default gateway, and primary DNS from the ISP directly into the security camera DVR system. The DVR is then connected directly into a switch that is coming from the modem (no router in between DVR and modem essentially). Whenever I type in ipaddress : port while connected to a different static IP but on the same network, I can access my DVR. When I try to connect it using a different network entirely, like someone else’s house or using my cellular hotspot, I cannot access the DVR.

Do I need to setup a router in between the DVR and the ISP modem that is configured to pick up the static IP address, then setup some kind of port forwarding? Can someone give me a step by step guide on what to do in my situation or point me in the right direction?
 
I have access to a static IP address that was unused. I decided to test it out and plugged the static IP address, subnet mask, default gateway, and primary DNS from the ISP directly into the security camera DVR system. The DVR is then connected directly into a switch that is coming from the modem (no router in between DVR and modem essentially). Whenever I type in ipaddress : port while connected to a different static IP but on the same network, I can access my DVR. When I try to connect it using a different network entirely, like someone else’s house or using my cellular hotspot, I cannot access the DVR.

Do I need to setup a router in between the DVR and the ISP modem that is configured to pick up the static IP address, then setup some kind of port forwarding? Can someone give me a step by step guide on what to do in my situation or point me in the right direction?

So you can access the DVR internally on your LAN, but not externally from a neighbors house? Am I understanding this correctly?

If your ISP gave you a static IP, chances are your DVR uses a specific port. Use the documentation/wireshark or router logs to determine which port the DVR is using. Then go to your router and perform PORT Forwarding. Use a unique port number that isn't used and configure your software to access this port when outside the home. When your router sees the unique port number, it will forward the traffic to your internal IP and Port.

When you are outside your home, you'll want to use your WAN address as the target.

So lets say your WAN is 123.45.67.89

Your DVR operates locally on 192.168.1.50:70 (Port 70)

Let's pick a random port number that's not commonly used:


49155 is a good random one. So set up your router when it sees 49155 to forward to 192.168.1.50:70 (Port 70)

When outside the home type 128.45.67.89:49155
 
Last edited:

coolkul

Honorable
Jun 29, 2014
21
1
10,515
So you can access the DVR internally on your LAN, but not externally from a neighbors house? Am I understanding this correctly?

If your ISP gave you a static IP, chances are your DVR uses a specific port. Use the documentation/wireshark or router logs to determine which port the DVR is using. Then go to your router and perform PORT Forwarding. Use a unique port number that isn't used and configure your software to access this port when outside the home. When your router sees the unique port number, it will forward the traffic to your internal IP and Port.

When you are outside your home, you'll want to use your WAN address as the target.

So lets say your WAN is 123.45.67.89

Your DVR operates locally on 192.168.1.50:70 (Port 70)

Let's pick a random port number that's not commonly used:


3300 is a good random one. So set up your router when it sees 49155 to forward to 192.168.1.50:70 (Port 70)

When outside the home type 128.45.67.89:49155


I don't even have a router set up for the DVR. I have two separate routers running on other static ip addresses, but I don't want to use those for the DVR. The DVR is connected to a switch that is connected to the ISP modem. There is no router in the middle. Should I get a router, so I can access the DVR from outside the home network?
 

kanewolf

Titan
Moderator
I don't even have a router set up for the DVR. I have two separate routers running on other static ip addresses, but I don't want to use those for the DVR. The DVR is connected to a switch that is connected to the ISP modem. There is no router in the middle. Should I get a router, so I can access the DVR from outside the home network?
Without a router, your DVR is open to attack from the world. It doesn't have a firewall or other protections.
 
  • Like
Reactions: digitalgriffin

coolkul

Honorable
Jun 29, 2014
21
1
10,515
In my opinion, yes. Use an existing router with appropriate port forwarding. Use an unusual WAN port even if you forward to a standard port on the NVR.

Ok, so I found a router lying around with DD-WRT already installed. I can't seem to get the router to pick up the internet connection even though I put in the the static IP information I got from my ISP. My DVR was able to connect to the internet no problems with the same static IP. I connect my laptop to the router and I get no internet.

edit:

I figured out what was wrong. I will be posting a new comment below going over everything and I'm hoping someone can give me some tips, but the remote viewing is working.
 
Last edited:

coolkul

Honorable
Jun 29, 2014
21
1
10,515
I got the remote viewing to work. First I set up a separate router onto my network with the static IP address I used for the camera. I set the camera to automatically pick up the IP address and it assigned itself a local IP from the router 192....whatever. I then assigned a port number directly from the DVR. I took the IP address of the DVR and the assigned port number and set up port forwarding so that when I'm remote viewing I can type the WAN : random port number and it would forward to the DVR which as a local IP : it's own port number that's different. Before, I had the DVR directly plugged into a switch that was plugged into the modem, so essentially I was connected directly into the modem. Because of this, there was no port forwarding that allowed me to view the camera on another network. The router was necessary to set this up.

So I still have one remaining question. I have set up the DVR MAC address to have a static IP. I inputted the IP address that was automatically assigned to it (192.something.something.130). Now I've read that I should actually pick a DHCP range that is outside of the default range. I'm assuming that the IP ending in 130, which was automatically assigned, is something I should avoid. Should I change the static IP configured for the DVR on my router to something different so that my DVR's locally configured IP address doesn't change? If I do that, will my DVR automatically pick up the newly assigned IP, or will I have to plug that in myself?
 
I got the remote viewing to work. First I set up a separate router onto my network with the static IP address I used for the camera. I set the camera to automatically pick up the IP address and it assigned itself a local IP from the router 192....whatever. I then assigned a port number directly from the DVR. I took the IP address of the DVR and the assigned port number and set up port forwarding so that when I'm remote viewing I can type the WAN : random port number and it would forward to the DVR which as a local IP : it's own port number that's different. Before, I had the DVR directly plugged into a switch that was plugged into the modem, so essentially I was connected directly into the modem. Because of this, there was no port forwarding that allowed me to view the camera on another network. The router was necessary to set this up.

So I still have one remaining question. I have set up the DVR MAC address to have a static IP. I inputted the IP address that was automatically assigned to it (192.something.something.130). Now I've read that I should actually pick a DHCP range that is outside of the default range. I'm assuming that the IP ending in 130, which was automatically assigned, is something I should avoid. Should I change the static IP configured for the DVR on my router to something different so that my DVR's locally configured IP address doesn't change? If I do that, will my DVR automatically pick up the newly assigned IP, or will I have to plug that in myself?

What you are talking about is the dhcp range. Typically they can start at 100 and end at 255. This is the range where ips are randomly assigned. An example would be 192.168.1.128. look for this dhcp number start in your router settings. If you stay below the start number you should be good. Me personally, i turn off dhcp and map all my macs to static ips. It makes keeping track of my devices easier.
 

coolkul

Honorable
Jun 29, 2014
21
1
10,515
What you are talking about is the dhcp range. Typically they can start at 100 and end at 255. This is the range where ips are randomly assigned. An example would be 192.168.1.128. look for this dhcp number start in your router settings. If you stay below the start number you should be good. Me personally, i turn off dhcp and map all my macs to static ips. It makes keeping track of my devices easier.

Ok, so a number like .5 should be fine I’m guessing? I’ll look into turning off DHCP. Would you happen to know how that is done with dd-wrt?