My ISP uses CG NAT which is stopping me from reaching my internal network, so I’m thinking about using Tailscale to allow me to connect to my server and hence to my internal network.

But I’m not very comfortable giving 100% access to Tailscale to my internal network, so I was thinking if I could limit it only to what it requires to connect to the internet and to a wireguard service running in the same container. This would in turn connect to a wireguard server in the container’s host and provide me with full network access.

I know, as long as they have a service running in the server, even if inside a container, they can always be able to access the host. But even do I would feel safer if at least tried to contain it.

Does anyone know if this is possible? And can it be done through Docker Compose?

  • cerothem@lemmy.ca
    link
    fedilink
    English
    arrow-up
    2
    ·
    4 days ago

    Depending on what services you want to give access with, I have had great luck with an ultra cheap VPS

    https://lowendbox.com/blog/1-vps-1-usd-vps-per-month/

    Then I host my edge services on a container and use an ssh tunnel to the remote host which gives me an ipv4 and any port forward that I want.

    For example I have my reverse proxy inside my network and my VPN server then I use a command like:

    ssh -R 8080:localhost:80 public.example.com

    Which would forward publicip:8080 to localhost:80

    Read more here: https://www.ssh.com/academy/ssh/tunneling-example.

    I use autossh to keep the tunnel alive at all times.

    https://www.harding.motd.ca/autossh/

    This is an ultra cheap way to get any ports you want and self host the whole thing. The remote VPS also doesn’t get any extra access to your local network and doesn’t initiate the connection so it doesn’t have credentials for your local network