Maroka-chan / VPN-Confinement

A NixOS module which lets you route traffic from systemd services through a VPN while preventing DNS leaks.
GNU General Public License v3.0
64 stars 2 forks source link

Bug: Namespace name does not allow `-` #2

Closed rasmus-kirk closed 3 months ago

rasmus-kirk commented 6 months ago

It seems like the module maps - to / which leads to invalid names. If I add a namespace name like:

    vpnnamespaces.testing-vpn = {
      enable = cfg.vpn.enable ;
      accessibleFrom = [
        "192.168.1.1/24"
        "127.0.0.1"
      ];
      wireguardConfigFile = cfg.vpn.wgConf;
    };

Then I will get an error:

Invalid netns name "testing/vpn"

Workaround: Use camelCase :shrug:

Maroka-chan commented 3 months ago

Cannot reproduce. It might have been fixed since. This would still fail though as the name is too long.