Hi all, I’m running a small website off of a raspberry pi in my house. I have opened ports 80 and 443 and connected my IP to a domain. I’m pretty confident in my security for my raspberry pi (no password ssh, fail2ban, nginx. Shoutout networkchuck.). However, I am wondering if by exposing my ports to the raspberry pi, I am also exposing those same ports to other devices in my home network, for example, my PC. I’m just a bit unsure if port forwarding to an internal IP would also expose other internal IP’s or if it only goes to the pi. If you are able to answer or have any other comments about my setup, I would appreciate your comment. Thanks!
I have my services proxied through nginx and behind cloudflares free tier. That way I don’t have to worry about my IP getting exposed and opening myself up to DDOS/DOS attacks, which is a genuine threat if you do things that piss people off (I’m an admin on a popular minecraft server).
It’s 2023, the threat is there regardless if you piss anyone off. We’re all commodities that can/will be exploited for capitalistic gain.
I looked into nginx for minecraft, but minecraft doesn’t use http headers, so I’d have to open minecraft ports on the router. Would this alleviate that? What’s the difference between this setup and using something like a cloudflare tunnel? Obviously, there is still some reliance on Cloudflare.
The port forward only forwards to a single device so you aren’t exposing your PC (directly anyway). Sounds like you have the pi good and secured but if you wanted to add another layer you could segment it out into a DMZ or its own VLAN. That way if something did happen with it an attacker couldn’t move laterally inside your network.
Realistically though you’re in good shape.
It should be safe, as it just exposes the Raspberry Pi. Make sure you’ve configured fail2ban to also watch the logs of all your webapps and ban people that try to brute force them (for example, if you host your own Vaultwarden instance, fail2ban should be configured to watch the Vaultwarden log for authentication failures).
For web apps that only you need to access (i.e. they do not have to be exposed publicly), consider using a VPN to access them remotely, instead of exposing the apps publicly. Wireguard and Tailscale work well for this. Tailscale is built on top of Wireguard and makes it very easy to get up and running.
If you port forward to your Pi, only your Pi will be exposed. But, if your Pi gets pwned, it can in turn attack anything next to it. Safest is to isolate the Pi on it’s own subnet or a DMZ if your router has the functionality.
Of note, many home ISPs block standard server ports like 80 and 443. You might need to use non standard ports like 8080 and 8443
I have no idea but am interested in answers.
I’ve only exposed ports briefly for testing and got scared.
I feel a little calmer using tailscale the past few months but still feels like putting a lot of faith in someone I don’t really know I can trust.
You’ll be ok as long as whatever software you’re running that is listening to 80 and 443 never has an exploitable vulnerability, if it does… you may be in trouble depending on the vulnerability.
Or be careful of the service on the other side of your (I assume) reverse proxy, should it have a vulnerability you may still be in trouble depending on the setup of the reverse proxy and what it’s config is.
You are probably going to be ok unless someone really wants to hack you. The LastPass hack that exposed passwords of millions of people started from an open port in the home network of one of their engineers.
If you want to be somewhat safer, you could try something like the cloudflare tunnel thing to proxy your home network through their server.
Honestly depends on what he’s hosting… Services like shodan are constantly scanning the web and are trying to see what is actually running in the machine.
If he’s serving something that’s vulnerable and has rce it won’t take too long for him to get automatically pwned.
We’ve seen this with the hafnium Echange vulnerability and all known vulnerable public facing web apps that used log4j.
Regarding the LastPass breach, the second part of the breach was using a very outdated version of Plex. Chances are high that his home machine was already hacked by other malicious actors.
I did this for some time. But now I don’t want any ports open at home.
That’s why I have a rented VPS that runs Traefik (a reverse proxy). This VPS has a VPN connection to my home net and is behind Cloudflare DNS. This is how I can safely expose services (even in my home net) to the Internet without forwarding any ports.
Of course those services need to have some kind of authentication.
I’ve been considering doing the same thing, but i’m not sure there’s much actual benefit over feeling like there’s more separation, because if someone accesses the vps, they get direct access into your server at home. What’s your opinion?
You could put the pi on its own subnet. That way if it’s hacked, the rest of the network is protected. Just make sure your router admin interface doesn’t answer on that subnet.
You could put the pi on its own subnet.
This option is sometimes referred to as a ‘DMZ’ and may be supported by the router. Also look for VLAN options.
DMZ in essence means “forward ALL ports” to X. You should only DMZ a host that you know is very secure as its attack surface is significantly increased. If you need just one or two services open, best to not use DMZ
No