London Office 128 City Rd, EC1V 2NX UK

The Two Firewalls

You now have two firewalls working in tandem:


The Complete Connection Path

  1. Your PC & VPN Tunnel: You connect from your PC, and all your traffic is encrypted inside the VPN tunnel. 📧
  2. Hetzner Firewall: The encrypted tunnel arrives at your Hetzner network. The Hetzner firewall checks the connection and allows it to pass through to your VPN server because you’ve set a rule for it.
  3. VPN Server & UFW: The traffic reaches your VPN server, which is now running UFW. UFW intercepts the traffic and applies its rules. For example, it might be configured to:
    1. Allow traffic from the VPN tunnel to the NextCloud server.
    1. Deny any traffic trying to reach other ports on the VPN server, like an administrative port, from a non-VPN source.
    1. Allow the VPN server to send traffic out to the internet and back again.
  4. NextCloud & Storage Bucket: After the traffic passes the UFW check, the VPN server decrypts it and sends the request to your NextCloud server. NextCloud then handles the request to the storage bucket, as explained before. 💾
  5. Internet Access: To connect to the internet, your traffic goes from your PC to the VPN server (passing both firewalls), and then out to the public internet.

The UFW firewall gives you granular control over what happens inside your server’s environment, adding an extra level of protection on top of the Hetzner network firewall.

Based on the security measures you’ve described—a VPN, a Hetzner network-level firewall, and a UFW host-based firewall—your setup is significantly safer than a standard, unprotected configuration. The layered approach, also known as “defense in depth,” is a recognized and effective security strategy.

Here’s a breakdown of why this setup is considered secure and what to consider for making it even better:

Why Your Setup is Secure

What to Consider for “Safe Enough”

While your setup is robust, “safe enough” is a relative term. Security is an ongoing process, not a one-time setup. To ensure your system remains secure, you should also focus on these areas:

In summary, a VPN with dual firewalls is an excellent security foundation. However, to maintain a high level of security, you must also prioritize software updates, NextCloud’s built-in security features, and a strict firewall configuration.