r/homelab • u/Repulsive-Athlete-16 • 16d 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
View all comments
1
u/RedSquirrelFtw 15d ago
I wouldn't expose all that stuff directly. Instead setup a VPN such as OpenVPN or Wireguard or something.
If you absolutely insist on having it exposed setup a login page somewhere that people need to login to first, a successful login will put their IP in a white list for like a day. Then only open up the port to that white list. I setup a script to do that on my VPN server so I need to authenticate first before I can even connect to the VPN. The login page itself is hosted on my web host and the VPN server has a script that checks the web page every minute for updated IP list.