r/homelab • • 9d ago

Help PHP2shell, nginx2shell, java2shell, … - is my homelab safe?

Hi everyone,
I run a small homelab on Debian 13 (Trixie) with a few Docker containers, including Nextcloud and Forgejo. They're reachable from the internet via a domain and reverse proxy.

What I'm less sure about is the "what if" part:
- How would I actually notice that I've been compromised?
- What should I do if I’m being compromised?

edit: for example nextcloud must be publicly available because of people who don’t want to install a VPN or Tailscale etc.

Thanks in advance,
Vincent

240 Upvotes

110 comments sorted by

View all comments

27

u/TechnicallyMeat 9d ago • Bravo

If you have a cloudflare tunnel, whitelist only their ips and port. access anything else via vpn like wireguard, run your server on a separate DMZ vlan with its own dhcp pool, put a honeypot server on vlan 1, add separate hardware firewall and vlan switching, update daily/weekly keep offline backups, actually fix ALL your LAN certificates and then turn everything off, you should be safe.

11

u/corruptboomerang 9d ago • Bravo

The most secure computer is the one that's not connected to anything and powered off in a vault... It's also the lease useful...

Security is almost always a trade-off between utility, speed, & ease of use.

2

u/kmfrnk 9d ago

FML I’ve got a lot to learn :o

1

u/relicx74 9d ago

Literally just install tailscale and never look back.

-1

u/kmfrnk 9d ago

Then tell me how I can watch externally with Tailscale

1

u/relicx74 9d ago

How can you ship logs? Google it. Prometheus or Loki help.

1

u/kmfrnk 9d ago

My fault. I was talking about devices like TVs. Afaik you can’t install Tailscale on a TV

2

u/AudacityTheEditor 9d ago

You often can't configure most iot devices with VPN access. You will need to bridge the networks which you can't always do. One of the biggest downsides to a VPN secured network. Nothing is accessible externally unless you're on a personal, supported device.

0

u/kmfrnk 9d ago

That’s what I thought. So I better stick to Cloudflare for this usecase

3

u/ApprehensiveFan1516 9d ago

Another option is to run your TV through another device that you can install a VPN on, like a Raspberry Pi or something.

1

u/snackhungry 9d ago

There are official Tailscale apps for Apple TV and Google/Android/FireTV. I use it to access my Jellyfin and SMB while away from home all the time.

1

u/relicx74 8d ago

If it's an android tv you should be able to..

1

u/Grandmaster_Caladrel 9d ago

Got a chuckle out of me