Summary

Building a home server is fun, and it’s a great way to learn something new. From hosting your own cloud storage to streaming media across your devices, a server can benefit your home in many ways. But the moment you leave that home, your server might as well not exist. Home servers can be opened up to the internet for remote access, but there are some things to consider first. Perhaps most importantly, you won’t be the only one trying to access your home server. The internet is constantly being crawled by automated botnets and malicious port scanners on the hunt for a new target. You don’t want your server to become that target, and a handful of services can help protect it. Centralized monitoring and alerting Eyes on system health and traffic spikes If you’re going to open your server to the wider internet, make sure you have a robust monitoring and alerting system in place first. Real-time insight into your server’s health, as well as any unusual traffic, can be vital and help warn you if something is amiss. Self-hosted tools like Uptime Kuma have become the go-to option for home server enthusiasts worldwide, and for good reason. It’s a lightweight monitoring tool that can alert you to anything untoward via a wide array of methods, including Discord, Telegram, and email. You can pair Uptime Kuma with a centralized logging system like Grafana. This approach gives you one place to view your server’s most important logs and can streamline troubleshooting. This approach ensures that, if an automated botnet attempts to flood your server with connections, you’ll be alerted before things get ugly. Automated intrusion prevention system Detect and block attacks Any server with a port that’s open to the internet is like nectar to the botnets of the internet. They spend their days probing connections for a way into local networks and the servers that run on them. An automated intrusion prevention system monitors for these remote access attempts and takes appropriate action. Popular tools like Fail2ban can automatically add identified IP addresses to a firewall to block further attempts to access your network. Tools like CrowdSec can augment Fail2ban by using crowdsourcing to improve cybersecurity. Any IP address that attempts to attack a single CrowdSec user will be instantly added to blocklists for all other CrowdSec users. This kind of automated, proactive protection can be invaluable to any home server administrator. Identity and access management Centralized multi-factor authentication A home server is only as useful as the apps and services that run on it. But not all apps and services are as secure as they should be, and two-factor authentication is often overlooked. Exposing these apps or services to the internet can be a recipe for disaster. An alternative approach is to use a third-party identity and access management gateway like Authelia or Authentik. External access would then go through a single sign-on (SSO) process with mandatory two-factor authentication layered on top. You can also add hardware security keys to the mix. A single sign-on approach can level up any home server’s security by ensuring that no unauthenticated traffic ever reaches vital apps or services. Remote access via secure tunnel Leave ports closed and do this instead You already know opening ports to the internet is a bad idea, and it doesn’t need to happen. There are plenty of modern remote connectivity solutions that can make your devices behave as if they were connected to your home network, even when they aren’t. Solutions like Tailscale or Netmaker can be used to create your own personal peer-to-peer network of devices. Add your server to that network, and it need never know where you are, whether you’re in the next city or on the other side of the world. Alternatively, many home routers include VPN support. When enabled, this allows remote devices to connect directly to the router from anywhere in the world. The catch? You’ll need to know your home IP address, and it could well change without warning. Reverse proxy for secure remote access Port protection and data security . You should never expose application ports to the internet via your router — it’s a huge welcome sign for attackers. Instead, a reverse proxy like Nginx Proxy Manager or Traefik can act as a single, secure gateway. A reverse proxy obfuscates your internal port layout and can be employed to evaluate all incoming requests before sending them to their destination. A good reverse proxy will even automate the application of SSL/TLS certificates via Let’s Encrypt — and it’ll even renew them. Five services, wraparound server protection Exposing your home server to the internet can be incredibly convenient, depending on what you use it for. And it’s all too easy to fall into the trap of spending time setting up a cool new service. But security can never be an afterthought. An insecure server is a ticking time bomb, but tools can shrink your server’s attack surface and make it less appealing to botnets. These five services are a great place to start. And, dare I say, they’ll even be fun to set up.

By Oliver Haslam

Original Article