Warning. This site uses cookies. They help with occasional site revisions late at night, with a cup of cocoa. Copyright: Dr Ian McLauchlin 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020. You are free to use the information given here for non-commercial,                            not for profit, purposes but please Acknowledge my Name and this source. Thank you.
HOW TO DO VARIOUS THINGS

HOME

How to create a pseudo-static IP address to facilitate viewing webcam video over the internet


I have a webcam viewing the marina outside my bedroom window. I also have a website with a page which includes the webcam image and this used to be a still image which updated every 10 seconds or so. To do this, I had to adjust the settings in my webcam program (Yawcam) and the image was updated to my hosting server using ftp (file transfer protocol). More recently I wanted to change this succession of stills to a moving image or video. This created extra problems  -  see below.


http://exmouth-marina.co.uk/webcam.htm

To view my webcam image, I used the software NetcamStudio. In contrast to the previous uploading of images to my hosting service, this software (and probably others like it) only uploads the IP (Internet Protocol) address of my computer and then acts as a server to allow the outside world to access my webcam moving image directly. (You need to open router ports, specified by the program, to allow access.)

Fairly straightforward you might think, but you’d be wrong.

My ISP (Internet Service Provider) only provides a dynamic IP address for home customers. The much more expensive Business Package provides the option of a Static IP address which is what I needed. How can I get round this?

First of all, an explanation of what a dynamic IP address is and why it’s standard in many ISP packages. Your ISP provides your computer with an address so that it can be seen, and contacted by all the computers on the internet. So when you request a webpage in your browser for example, the host of that page knows where to send it.

There’s a limited number of IP addresses to go round (though this is increasing with IPv6 for example). So that individual computers don’t hog an IP address all to themselves, the ISP can change that address whenever it wants. So if you turn off your router, when you turn it on again it’s likely that your ISP will allocate a different IP address. Also, to suit its own operational requirements, the ISP can change your IP address when it maintains its own servers for example.

Normally, this doesn’t matter. If you request a web page, then the address to send it to is your IP address at the time you request it. It doesn’t matter whether that’s the same address as yesterday, or even an hour, or a minute before.

BUT if a computer on the other side of the world wants to see your webcam video, and your server says it’s at a given IP address (a static one), then if that IP address changes, your webcam is no longer accessible. That’s the problem with a dynamic IP address. In my case, I used to check my dynamic IP address everyday and, if it changed, I updated my website manually with the new IP address. This worked successfully for a few weeks but then one day my IP address changed several times in one day. Time to take action.

A solution is for your website to direct all requests to view your webcam to a fixed address, independent of your (dynamic) IP address. How do you do that?

There are probably a number of providers of this facility. I chose no-ip.com. You have to create an account (free) with the usual username and password requirement. You can then create a host address with a domain name using your username followed by a choice from a limited number of suffixes eg. username.ddns.net. You then put this hostname in your website code. You must download a related program (Dynamic DNS Update Client) DUC.exe from the no-ip site and link this, using your username and password, to your domain name. If you run DUC on your computer whenever your webcam and server program are running, it monitors your IP address and keeps your no-ip account up to date so that your domain name always points to your current IP address!  And that’s how to do it.

Updated 6 aug 17