PDA

View Full Version : Help from the Networking Guru's!



Scott Shepherd
05-08-2015, 7:54 PM
Just a general question. I'm playing around with Arduino's and Raspberry Pi's and once of the things I was messing with was some program on the Pi that allowed you to access the PiCam via the internet. It's pretty simple, you just run the program, identify the Pi's IP address (I think I used an app on my iPad to find the IP address for it), and then type that in the browser and you're looking through the camera. Works just fine, but that's an internal network IP address. I can't access that IP from anywhere else.

What do I need to do differently to setup, or open up, maybe the router, or maybe (I'm thinking out loud) opening up one port for that IP address (the port that allows access to the camera), or what?

Right now, on all my networks that I'm playing with this stuff on, they are all behind routers. I certainly don't want to open up my entire networks just so I can have access to that.

Or.....maybe I'm going about this all wrong.

Any insight from the network guru's on here?

Phil Thien
05-08-2015, 8:43 PM
Just a general question. I'm playing around with Arduino's and Raspberry Pi's and once of the things I was messing with was some program on the Pi that allowed you to access the PiCam via the internet. It's pretty simple, you just run the program, identify the Pi's IP address (I think I used an app on my iPad to find the IP address for it), and then type that in the browser and you're looking through the camera. Works just fine, but that's an internal network IP address. I can't access that IP from anywhere else.

What do I need to do differently to setup, or open up, maybe the router, or maybe (I'm thinking out loud) opening up one port for that IP address (the port that allows access to the camera), or what?

Right now, on all my networks that I'm playing with this stuff on, they are all behind routers. I certainly don't want to open up my entire networks just so I can have access to that.

Or.....maybe I'm going about this all wrong.

Any insight from the network guru's on here?

Port 80 needs to be forwarded on your router to the IP address of the Pi.

Then you need to find the WAN address of the router, if you don't already know it, by going to something like www.whatismyipaddress.com (http://www.whatismyipaddress.com) on some computer connected to the same router as the Pi.

Now form another location, you can put that WAN address into a browser, and you should see the Pi's pic.

Extra credit:

(1) Each time your router starts (like after a power outage, or you had to restart the thing because it got goofy), it may assign a different IP to the Pi. The router may have a way to associate an IP with a MAC address. So each time the Pi asks for an IP, the router always gives it the same one. This is important because otherwise, if the power gets cycled and the Pi has a different address, the port forwarding I mentioned above will no longer work.

(2) Anyone that goes to your WAN IP address will be able to see your pic, and they may find it via IP port scanning. You could redirect a different port to port 80. So you could pick 2468, for example, and tell the router to send that to port 80 on the Pi. Now add :2468 onto your WAN address and you'll see the pic.

(3) You can use a dynamic DNS service so you don't have to remember the IP address. Something like scottspics.dyndns.org (so that would be using dyn's service) may be easier to remember.

Scott Shepherd
05-09-2015, 12:00 PM
Thanks Phil, I'll have a look into that when I can get a chance to play with it some. I did look on my home network last night and apparently I don't have that much control on that product (it's an airport express).

Is there a way to password protect port 80 if I open it up on that IP address, to keep port sniffling dirtbags out?

paul cottingham
05-09-2015, 12:18 PM
+1 for using a way higher port, and using dynamic DNS to make it simple to find online.

Robert LaPlaca
05-09-2015, 12:31 PM
Thanks Phil, I'll have a look into that when I can get a chance to play with it some. I did look on my home network last night and apparently I don't have that much control on that product (it's an airport express).

Is there a way to password protect port 80 if I open it up on that IP address, to keep port sniffling dirtbags out?

Really good advice given, I would try not to use a port below 1024 for the external side of the camera.. The best way to protect the camera is if it has some kind of built in authentication, user and password, that means not using the factory default values if it does offer authentication..

Having said all this, obviously the best way to keep the camera out of sight of the bad guys is to never make it accessible from the internet