Accessing Your Home Cameras and/or Home Automation From Anywhere

ano

Senior Member
This is a subject that comes up now and then, so I wanted to write about what I do. I've used this method for many years with good results. (There may be other ways to accomplish this as well, but this is just MY way of doing it.)
 
So the problem is you got a great webcam on your network, or perhaps a home automation controller. When you are on Wi-Fi with your phone say, you can access your camera or home automation at your local IP address, say 192.168.1.100.  When you are out of your house, you can access your camera or HA using a dynamic DNS provider like Dynu or No-IP. But the problem is, how can you access inside your house OR outside your house without changing anything? 
 
If you have a webcam with a service, typically they handle all this, but if there is no service, you are on your own. 
 
So lets use an example. You want to access your Leviton/HAI Omni both inside your house and outside.  On your local network you know its on the IP address of 192.168.1.100.  All works well in Snaplink, for example, inside but not over cellular on Verizon, AT&T, T-Mobile, etc. 
 
So you activate a Dynamic DNS provider.  I use Dynu, which is free.  Basically you run their client on a local PC, Mac, or Unix box, and every few hours it determines your outside IP address, and updates its records.  Then you use a IP address you make like "myha.dynu.com" to access your home. 
 
But wait, lets stop here. Why does your home IP address change anyway?  Because Comcast, AT&T, Cox, etc. has a pool of IP addresses, so the one you have is only temporary.  May Internet Service Providers change these IP addresses daily, whereby others almost never change them, but unless you pay extra for a "fixed IP" address, you have to assume it could change at anytime.  This is why you need a Dynamic DNS provider like Dynu.
 
But wait, one more thing... A Dynamic DNS provider only gets you to the IP address of your house, NOT to the IP address of your device on your network.  This is where port forwarding comes in.  We already said our HA box was on IP address 192.168.1.100,  but there is more to it, there is also a port address.  HAI, for example uses port 4369, and we use this to our advantage. If some program comes knocking at our home's IP address, wanting to talk on port 4369, then we assume it wants to communicate with our HAI box. So to make this happen, we set port forwarding in our router, on port 4369 to IP address 192.168.1.100 
 
As a security measure you may want to change this port number to another not so known port, but you need to make the port match in your router and in your panel/camera.
 
O.K. so now we can access our system outside our house with our Dynamic DNS address, and inside our house with our local IP address. But how do we make ONE address work for both?
 
The secret sauce is to make our inside address match our outside address. So our outside address is "myha.dynu.com" and our inside address is 192.168.1.100  So how do we do that?  The trick is running your own DNS server on your home network. Add the entry "myha.dynu.com" and have it translate into ----> 192.168.1.100
 
There are free DNS servers everywhere, but you need a PC or Mac or Unix box that is always running, maybe the one you have your Dynamic DNS client running on.  There are many open source ones out there. Just pick a simple one.  So your running this software, and you added in one simple DNS entry, "myha.dynu.com"  ----> 192.168.1.100
 
So normally your DNS server gets set by your Internet service provider, but you can change it.  For example Google runs a free open DNS server at 8.8.8.8, and at 8.8.4.4  You could put these two IP addresses in your router as a DNS server, but instead, put the IP address of your computer running your new DNS server.  In your new DNS server, you will need to put in a forwarding server, which is the DNS server for requests YOUR server can't perform.  Add 8.8.8.8 and 8.8.4.4 here.  So this will pass along requests from your DNS server to Google.
 
Now if you want to view your home camera or control your HA, just use the address myha.dynu.com
Outside your house it works like it did before, but inside your house, it goes to your own DNS server, which translates myha.dynu.com  to the IP address 192.168.1.100
 
So this should work inside or outside. I've done it like this for years and its been very reliable. Not the simplest, I know, but it works.
 
 
 
 
 
 
In addition to using your own DNS server, there are two other methods to accomplish the same thing.  The first is that you can just add the ip address and host name to your local "hosts" file on your computer and it will resolve to that host name.  The second method and preferred is that many routers have a feature called "NAT loopback" or "NAT reflection" or Hairpin NAT".  Enabling this feature allows using the external DNS at your dynamic DNS provider to function internally as the router loops the connection back to the local network resources.
 
Here have evolved somewhat from the 1990's CCTV / Automation views on the internet to using VPN.
 
Everything relating to the connectivity from the Internet to the house and from the house to the Internet has changed.
 
Back
Top