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?

  • irmadlad@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    3 days ago

    But I’m not very comfortable giving 100% access to Tailscale to my internal network

    Out of curiosity, why are you uncomfortable with Tailscale?

    • TheFrogThatFlies@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      3 days ago

      I have a single server with everything inside. By using Tailscale to access my server I’m giving full access to it and the entirety of my network to a third party tool that I don’t know that well.

      • irmadlad@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        3 days ago

        entirety of my network to a third party tool that I don’t know that well.

        Understandable.

  • codemichael@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    7 days ago

    Yes, you can run Tailscale in a container. You could create a second VLAN, attach it to your hosts interface, add a macvlan docker interface to the container and put it directly on your network.

    If you have concerns about the software running on your host I would recommend getting a dedicated piece of hardware instead (rpi, zimaboard, etc).

    How paranoid are you wanting to be? You can either go Headscale, or Tailnet Lock (my preference) to give your self some peace of mind. It completely depends on your threat model, which you didn’t mention.

  • Droolio@feddit.uk
    link
    fedilink
    English
    arrow-up
    2
    ·
    7 days ago

    There’s no point doing anything fancy like that - wireguard over Tailscale is pretty pointless, as Tailscale is literally wireguard with NAT traversal and authentication bolted on. Unless you enable subnetting, it can’t get more secure than that.

    And even if you do enable subnetting (which you might wanna do if you need access to absolutely everything), you can use Tailscale ACLs to keep tighter control - say, from specific (tagged) devices.