Did you know it's possible to quickly access a device or files stored on the network if away from home? By configuring your home LAN and everything on it accordingly, you can access various services away from home and save money by running your hardware instead of relying on cloud platforms. This guide will show you how to get up and running.
Why you'd want to remotely access your home LAN
So, why would you want to access your home LAN while away? When bringing services back into the fold, such as file hosting and media streaming, you’ll be setting up servers, systems, and services on your home LAN. Accessing from within your network is easy since everything is open through the router, but there's a good chance your router blocks external access for security reasons and your ISP likely provides a dynamic IP address. You’ll need to configure the router or firewalls to allow remoter access to specific IP addresses and ports, as well as set up a DDNS to maintain connectivity even if your home external IP changes.
There are various ways to allow access to your home NAS but you first must determine whether this is something you truly require. Being able to load up a movie, some music, passwords, or connect to a PC running at home is handy, but having no access is always more secure than providing access. Thankfully, there are some ways to set everything up and I’ll run through some more secure methods. The idea is to provide limited access, placing restrictions on as much as possible without hampering service availability. For instance, to connect to a NAS at home, we'd only allow singular access to the server and nothing else.
Always keep your router and other network equipment updated since newer firmware can contain security patches that will come in handy as we open up the network to the world.
How to connect to your home network remotely
Before we do anything, we’ll need to tackle the dynamic IP issue. A dynamic IP address is detrimental to opening up your home LAN due to frequent changes. If you know an IP address for a website or service, you can use it continuously and each time will load it without trouble. Loading up your home external IP address after the ISP has provided a new one will result in problems as it’s assigned elsewhere. A dynamic DNS (DNSS) solves this by allowing a device on your home network to automatically update an external service with the new IP.
Instead of finding out what the new IP address is, this external service can provide a web address that can be used even if your home IP is different. For example, Synology offers its DDNS service, allowing you to create addresses such as yourlan.synology.me. A router or Synology NAS would work well for the job as the OS can handle DDNS for all services running on the enclosure, updating records to keep connections alive. A DDNS is also great for sharing your home LAN and anything running through it with other people, using memorable addresses.
VPN
You’ve likely heard of a virtual private network (VPN) and the same tool can be used to open up your entire home network to authorized hardware. With a VPN configured correctly, you can use your devices to connect to other destinations on your LAN just like you would at home. Businesses use VPN connections for employee laptops and other hardware to provide secure access to internal locations and a similar setup can be achieved at home. Just note that a VPN will connect the client to your LAN, as opposed to specific hardware.
A VPN works by creating a secured connection between a client and the host, the latter of which will be present behind your LAN. It’s a good idea to use a VPN when on public networks even when not looking to reach your home LAN as it ensures your data is shielded from prying eyes. Using it for remote access is a great way to call home and doesn’t take much effort to set up. A router should be able to handle such a task, though something as small as a Raspberry Pi other other single-board computer (SBC) will suffice.
Reverse proxy
Setting up a reverse proxy is less common but more secure than a VPN. This method restricts access to specific services and locations on the LAN, making reverse proxies ideal for different systems without opening up the rest of the network. Instead of opening up ports on your router, a reverse proxy limits access to specific services on a device. Consider a reverse proxy as a router within the LAN. The proxy will direct external traffic through the LAN to internal destinations. This is great for opening up access to multiple devices without sacrificing security and with a single entry point for traffic, you can quickly make changes and manage everything.
It’s a more advanced option for opening up your home network, but NAS systems can come with the feature, allowing you to quickly set everything up for services running on the same NAS. If you want to go deep into the networking world, I recommend dedicating a device as a reverse proxy. This could be your router or another network connection with Apache or Ngnix.
FAQ
Q: Do you need SSL?
Yes. SSL should always be used wherever possible. Even if it's a self-signed certification, using HTTPS is better than not, even if you configure your home LAN with VPNs, reverse proxies, and firewalls.
Q: Is a VPN required for accessing your home LAN?
While a virtual private network (VPN) is not required to access your home LAN, it's highly recommended. With a VPN host running from within the home network, it's possible to directly connect to the LAN as if your device was physically attached to the network. It's a great solution to family members you wish to provide access to, but for everyone else, I recommend reverse proxies to open up specific services on the LAN.
