Computer Networks

tillson

Esteemed Pedelecer
May 29, 2008
5,249
3,197
This is all a bit new to me.

I've installed security cameras around my house. They are IP cameras powered by Power over Ethernet. They work fine, I can see them on my local network and the ouput records onto my NAS. I can even view them remotley via a web based quicklink facility.

However, I want to connect to the cameras via something called Port Forwarding and this is new to me.

I have configured my router to forward Port 80 for the LAN IP address of each camera.

So for example if my camera LAN IP address is 192.168.0.16 and I have forwarded Port 80 for that address and the external web IP address of my router is XX.XX.XXX.X what do I type into a remote computer in order to access the camera?

http://?
 
D

Deleted member 4366

Guest
First, you have to get your external IP, which you can get from your router or type into Google "whatsmyip". 192.168.00.16 is only accessible from within your network.

Then the external address of the camera/recorder is http://xx.xxx.xx.xx:80

Note that many phone apps don't work with your IP directly. They want you to use their own proxy server for some reason, so if the camera/recorder comes with a link to a phone app, follow their instructions.

Also, your external IP isn't fixed. Mine rarely changes (years), but others can change frequently, which is why you need to use the system they recommend.
 
Last edited by a moderator:
  • Useful
Reactions: tillson

tillson

Esteemed Pedelecer
May 29, 2008
5,249
3,197
First, you have to get your external IP, which you can get from your router or type into Google "whatsmyip". 192.168.00.16 is only accessible from within your network.

Then the external address of the camera/recorder is http://xx.xxx.xx.xx:80

Note that many phone apps don't work with your IP directly. They want you to use their own proxy server for some reason, so if the camera/recorder comes with a link to a phone app, follow their instructions.

Also, your external IP isn't fixed. Mine rarely changes (years), but others can change frequently, which is why you need to use the system they recommend.
Thanks d8veh. I've got my external IP address. Like yours, the address changes very infrequently.

So you are saying that to access my camera (Port 80 forwarded) from outside my local network I enter http://(external router IP address):80

How does it know which device to connect to because I'm sure other devices on my network use Port 80 as well?
 
D

Deleted member 4366

Guest
I think you have to use a unique port number for each device.
 
  • Useful
Reactions: tillson

soundwave

Esteemed Pedelecer
May 23, 2015
15,973
6,292
 
  • Useful
Reactions: tillson

JohnMcL7

Finding my (electric) wheels
Nov 11, 2015
13
8
43
How does it know which device to connect to because I'm sure other devices on my network use Port 80 as well?
That in a nutshell is why you need port forwarding. NAT (Network Address Translation) is a feature on your router that allows multiple devices in your house to use the one IP address externally - the router cleverly manages all the outgoing requests so that each device that sends a request out say for a web page, gets the right web page data back.

The problem is while the router knows which device sent the outgoing requests, if an incoming request is received on its own the router doesn't know what to do with it. This is where port forwarding comes into it - port forwarding sets rules on your router and tells it how to handle incoming traffic by explicitly defining which device it should send the traffic on certain ports to. So if you have a webserver on internal port 192.168.1.100, you'd set a port forwarding rule to set all port 80 traffic to go to 192.168.1.100.

Your problem of course is that you have more than one device and you can only choose one on port 80 to port forward to at a time. The way around this is to set each camera on a different port so you'd redirect port 80 to say 192.168.1.100, set the second camera to respond on port 81 and therefore set port 81 to redirect to 192.168.1.101 etc. Then externally you'd choose http://x.x.x.x:81 to go to the second camera, http://x.x.x.x:82 to go to the second camera and so on (where x.x.x.x is the external IP address)

If you do this, you'll also need to use the different port number internally as well so the second camera would be 192..68.1.101:81 as well and wouldn't work on just 192.168.1.101

John
 
  • Useful
Reactions: tillson

anotherkiwi

Esteemed Pedelecer
Jan 26, 2015
7,845
5,785
The European Union
Careful! Don't use ports that are already assigned! You need to know which ports are available on your router. You may have to activate them if your ISP has done the right thing and actually done (gasp) some security lockdown... But you are probably safe there, they don't seem to care too much about user security these days.
 
  • Useful
Reactions: tillson

tillson

Esteemed Pedelecer
May 29, 2008
5,249
3,197
That in a nutshell is why you need port forwarding. NAT (Network Address Translation) is a feature on your router that allows multiple devices in your house to use the one IP address externally - the router cleverly manages all the outgoing requests so that each device that sends a request out say for a web page, gets the right web page data back.

The problem is while the router knows which device sent the outgoing requests, if an incoming request is received on its own the router doesn't know what to do with it. This is where port forwarding comes into it - port forwarding sets rules on your router and tells it how to handle incoming traffic by explicitly defining which device it should send the traffic on certain ports to. So if you have a webserver on internal port 192.168.1.100, you'd set a port forwarding rule to set all port 80 traffic to go to 192.168.1.100.

Your problem of course is that you have more than one device and you can only choose one on port 80 to port forward to at a time. The way around this is to set each camera on a different port so you'd redirect port 80 to say 192.168.1.100, set the second camera to respond on port 81 and therefore set port 81 to redirect to 192.168.1.101 etc. Then externally you'd choose http://x.x.x.x:81 to go to the second camera, http://x.x.x.x:82 to go to the second camera and so on (where x.x.x.x is the external IP address)

If you do this, you'll also need to use the different port number internally as well so the second camera would be 192..68.1.101:81 as well and wouldn't work on just 192.168.1.101

John
Thanks for taking the time to write this very clear explanation. It's exactly what I wanted to know.
 

tillson

Esteemed Pedelecer
May 29, 2008
5,249
3,197
Careful! Don't use ports that are already assigned! You need to know which ports are available on your router. You may have to activate them if your ISP has done the right thing and actually done (gasp) some security lockdown... But you are probably safe there, they don't seem to care too much about user security these days.

Thanks for the tip.
 

Advertisers