Zend certified PHP/Magento developer

SMB over VM over VPN?

I’ve been struggling with forwarding traffic to SMB over VM that connects to my reverse proxy server that has public IP.

My setup:

  • Home:

    • [Debian11 server with SMB] (My server rack)
    • [Ubuntu VPS] (my VM that is connected using VPN to my public VPS that acts as a reverse proxy) (have bridge connection between host and VM)
  • Public:

    • [Ubuntu VPS with public IP] (Hosts the VPN server)

I don’t have access to the router at my home, so I can’t port forward, so for that, I’ve managed to make a reverse proxy to my VPS using VPN and iptables rules. But what I haven’t figured out yet is how to forward SMB traffic to the VM from where I could forward the traffic into WireGuard VPN so if I connect to the VPN I can access the SMB server.

The reason why I don’t simply run the VPN client on my host instead of my VM is that I need to be able to torrent, which I couldn’t since the public VPS doesn’t allow torrenting and they would BAN me from their services.

so simply what I need is to connect

SMB -> VM -> VPN -> public VPS -> hidden behind firewall

Where I will be able to connect to SMB by connecting to the VPN server so I can access SMB.