top of page

Chapter 8 Access your Pi from anywhere

ET wants to phone home..

More Raspberry Pi.....

This is not for the faint of heart.... But, if you have made it this far, you

should be fairly Pi Fluent and comfortable with the previous topics.

OK, so you have been having fun making Webcams! 6 Webcams! Mittens has no

place in the house to hide the catnip ball that we can't see! So, you have read the

earlier posts and set up fixed IP addresses. Cam 1 is, Cam 2 is, etc. You can put that in your browser, click "HTML" and see your

Mittens Live! But you are in your house, on your "Local Area Network", or LAN. Then

reality hits.... You have to go back to work! How do I keep track of Mittens?????

Toto, you're not in Kansas any more.... The other side of the router is called the

"WAN", or Wide Area Network. You can get there from here. It gets a little

complicated, but let's try to break in down to simpler terms.

Enter the term Ports. When you access your camera with a browser, you type

in But your browser assumes It is assuming port 80

for you. When you log in from a terminal, SSH assumes port 22. But, that is on the

LAN side. When you are on the WAN side, your provider gives your house it's own IP

address, say ( So, you put into your

browser. It tries to bring up the web page for your router, but has no clue you

have 6 webcams on the same port. And, the web page for your routed is turned off

from default from the outside "WAN". Port numbers are expected for specific

purposes, but CAN be played with. Enter "PORT FORWARDING".

You can put into your browser. It is looking for port 3011

somewhere in your house on your LAN. In your router, which all are different, you

search for "Port Forwarding". You forward port 3011 to port 80 (The normal web page

port), at, or Cam 1. You also port 3012 to port 80 at

So, now, you are at the coffee shop and in your browser, you enter Up comes Mittens on Cam 1! Enter There she

is om Cam 2! You have taken specific port numbers and assigned them to specific

functions on your internal network. That is how you access your specific Pi from

the outside. Forward port 3111 to port 22 (the normal SSH port), at

and now you can remotely log into Cam 1 with SSH from the outside. Just connect

with Obviously, you need to input your addresses for your


So, knowing the IP address for your modem in your house, and setting up

specific unique ports for each Pi and forwarding them to the PI at the expected

port, you can select a specific function at a specific Pi by a unique port number


To reiterate, all of your Pi's are looking to respond to port 80 with a web

page with live video. You enter into your browser. Not good enough.

Enter Your router translates that to by your

configuration. Cam 1 wakes up seeing port 80 activity, and sends you live video.

Likewise, wakes up Cam 2. Port forwarding is like "Press 1 for

parts, press 2 for service, press 3 for sales....." You map out a port to cam 1 for

video, another port for remote login with SSH, two more ports for Cam 2, two more

for Cam3, etc. You will eventually have a list of ports for each pi for video, for

ssh, for telnet, etc.

OK, so it's more like Press 1 for Ford parts, press 2 for Ford service, press

3 for Ford sales, press 4 for GM parts, press 5 for GM service, press 6 for GM

sales, press 7 for Toyota parts, press 8 for Toyota service....... you get the

picture. Port numbers ... extension numbers.... similar concept.

So, once you know your ip ( for your modem in your house,

you can configure your router to use port numbers to access different functions

from different Pi's. COOL! You can get back to your Cameras from the Smart phone,

the tablet at the coffee shop, whatever.....

THEN... SPECTRUM CHANGES YOUR IP! Now, you have to go to

to see Mittens on Cam 1. So, you have to go back home and bring up,

or whatever, to see what your new IP address is. Then update your bookmarks to point

to the new link. But, you are away on vacation. You can't check your IP because you

aren't home. Now what???? Enter DDNS. Remember DNS from an earlier post?

It was like a Phone Book of IP addresses. Sears was and

Macys was But, you type in and it automatically takes you to But, how do they know me or where I am IP wise? THEY DON'T!!!

Places sell custom domain names, and publish them in a "Phone Book". So, Macys pays

to register the name Macys and have published in the book as well.

But, your number may change. Enter DYNAMIC DNS. Your IP address of your modem

is monitored. If it changes, your number in the "Phone Book" is updated as well. That

method varies, depending on their software. I use There are many others.

My domain costs about $20 per year and includes Dynamic DNS. There are several ways

to implement DDNS. I chose to download Open WRT software to replace my router's

software. It gives me a lot more functions than the stock software. It also allows me to install

software that monitors my IP address and update when it changes.

They all work similarly, some having protocols imbedded in the router software.

So, is it worth it?, Your choice. If you are happy typing in

and searching for the new number when it changes, you are good. If you would prefer

to use "MyCallSign".com and have it automatically update for about $20 per year,

you can do that too. Instructions for that depend on the provider. You will need to

read their help files or ask for support to get it running on your system. It is

different for every router and every provider. It is a lot of work, but when you

have it set up, you can be anywhere in the world, type in and see

Mittens chasing that catnip ball! Maybe Mittens should read 1984.....

Here is the above as a downloadable pdf.

Download PDF • 19KB

Jim Albrecht K2BHM

4 views0 comments

Recent Posts

See All

The Raspberry Pi is a small handy computer. Lots of programs are available to do all kinds of things. It's easy to use the mouse and keyboard to bring up the program you need and you're off and runnin

bottom of page