It’s as secure as the server software is. If the Minecraft server is breached, so could that host machine and your network.
If you’re terribly concerned about it, you could have you and your friends create a VPN using ZeroTier and connect through the private network that way. This way, your ports are only exposed to the handful of machines granted access to the virtual network instead of literally any machine on the internet. Additionally, your traffic would be encrypted between clients and your host.
Latest Answers