Why am I able to control my IP camera when I’m home, but not from work? When at home, I’m able to check the footage from my IP camera on my iPhone, but not when I’m out. Why is this? I helped out a number of people who all asked the same question. Now that IP Cameras have become cheaper, I get asked these questions more often. The answer involves Port Forwarding.
Arouter has several internal connections and one external connection. The picture below illustrates the back of a router. The external connection is called the WAN port. The 4 internal connections are called the LAN ports. Internet is also called WAN and your home network is a LAN:
Connect the WAN connection port on your router to your Internet Modem using a UTP cable. The Internet Modem is the box that connects you to your Internet Provider. You can connect four different devices within your Home Network to the LAN connection ports of your router. E.g. a computer, a laptop, an IP Camera and a NAS (such as Synology). Besides this, you can also connect other devices to your router using Wi-Fi. Your router receives an external IP address from your Internet Provider. The example above illustrates that the router has 220.127.116.11 as its external IP address. This external IP address is – let’s say – linked to your WAN connection. If you would like to know what your external IP address is, please check WhatIsMyIp. Your router also has an internal IP address within your LAN. Using this address, devices connected to the router are able to locate the router. In our example, the router has 192.168.1.1. as its internal IP address. That is a commonly-used internal IP address for a router. Likewise, 10.0.0.1 is also often used as an internal IP address for a router. A number of devices can be connected to the LAN connection ports of the router. This post example involves a computer (B) and an IP Camera. The router has allocated the computer an internal IP address of 192.168.1.2 and has allocated 192.168.1.3 to the IP Camera. When you connect a number of devices to your router using Wi-Fi, these devices will also receive internal IP addresses, e.g. 192.168.1.4. If you’d like to connect to your IP Camera from within your LAN, e.g. from Computer B, then you should copy the Camera’s internal IP address (192.168.1.3) into a browser on computer B. If you’d like to connect to the same IP Camera across the Internet, e.g. from the laptop in the picture above, then entering the internal IP address of the Camera into a browser on the laptop will not work. This is because the 192.168.1.3 address can only be used in your LAN and not in the WAN. When using the laptop, you’ll have to use the external IP address to connect to your home network. Then your ‘request’ will reach your router. Your router should forward it to the correct device in the internal network. But how does your router know which device the request is intended for? Is it intended for the IP Camera or for Computer B? The router’s default firewall settings will reject all requests that come from internet. You’ll have to configure your router to allow certain requests originating from the Internet, e.g. requests to connect to the IP Camera. You should also configure your router to send requests to the correct devices. You can set such configurations using the Port Forwarding function of your router. Ports It’s also important to be aware that many different kinds of WAN or LAN requests can be made. Visiting webpages and sending emails involve different kinds of requests. This means that different kinds of communication by WAN or LAN are possible. To ensure that different requests are kept separate, every information type has its own port number. There are a number of default port numbers that are commonly used (source Wikipedia):
When you connect to a website from within your browser, default port 80 is used. You can also connect to an IP Camera. An IP Camera has embedded webserver software that will work on the default port 80. So, when you enter the IP address of the IP camera within your LAN, a connection will be made on port 80 of your IP camera and you’ll be able to view your IP camera’s login screen. It’s also possible to configure your IP Camera to use a port other than port 80, e.g. port 1501. If you then enter your IP Camera’s IP address into your browser, you will NOT be able to view your camera’s login screen. This is because your browser will attempt to connect to port 80 by default. If you’d like to connect to another port, you’ll need to enter the port number into your browser after the IP address: http:192.168.1.3:1501. The IP address and the port number must be separated by a colon. If your IP Camera responds to port 80, then http:192.168.1.3:80 will also work. But, as mentioned above, port 80 is the default port and doesn’t need to be entered. There are around 65 000 available port numbers. A number of default port numbers have already been listed above. Visit Google to find further information about the use of port numbers. Now that you have a clear understanding about the use of port numbers, you can use different WAN port numbers to connect to different devices within your LAN. You can configure your router to make it connect to the right device based on the port number of the request (Port Forwarding). Suppose you have 3 IP Cameras in your LAN. You could configure them to respond to different ports:
- 192.168.1.4 port 1501
- 192.168.1.5 port 1502
- 192.168.1.6 port 1503
- 18.104.22.168 port 1501 (Camera 1)
- 22.214.171.124 port 1502 (Camera 2)
- 126.96.36.199 port 1503 (Camera 3)
Live Cams Pro add camera
Please note: enter the external IP address of your router! By using three different ports, you can connect to three different IP Cameras. Now you can use your phone (using this app) to connect to your three cameras. It makes no difference whether you’re at home (with your telephone connected to your Wi-Fi network) or elsewhere (with your telephone connected to the Internet via 3G, etc.).
- configure every IP Camera in your home network to respond to a different port number
- configure port forwarding on your router (consult your router’s instructions on how to configure port forwarding)
- use the external IP address to connect to your IP camera across the Internet and use the port number that your camera responds to
- configure your router to forward requests with a certain port number to the corresponding camera (port forwarding)