Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

services.networking.gns3-server -> ubridge problems #322415

Open
TafkaMax opened this issue Jun 25, 2024 · 1 comment
Open

services.networking.gns3-server -> ubridge problems #322415

TafkaMax opened this issue Jun 25, 2024 · 1 comment

Comments

@TafkaMax
Copy link

TafkaMax commented Jun 25, 2024

Describe the bug

uBridge requires root access or the capability to interact with Ethernet and TAP adapters

Steps To Reproduce

Steps to reproduce the behavior:

  1. I have setup gns3-server via the services module and gns3-gui via home-manager.
    nixos-snowfall.home.extraOptions = {
      home.packages = with pkgs; [
        gns3-gui
      ];
    };
    # Add gns3-server as service.
    services.gns3-server = {
      enable = true;
      ubridge = {
        enable = true;
      };
      auth = {
        enable = true;
        user = "gns3";
        passwordFile = "/path/to/password";
      };
    };    
    # Add current user to ubridge group.
    users.users.${user.name}.extraGroups = [ "ubridge" ];
  1. Setup a virtual device and 'Cloud' end device.
  2. Try to add a link between the cloud device and the virtual device.

Expected behavior

I expect the link to be made, e.g. my user has access to ubridge.

Screenshots

If applicable, add screenshots to help explain your problem.

  1. Server prefs in gns3-gui
    image
  2. Topology
    image

Additional context

I am running the gns3-server and using the gns3-gui on the same machine. One is running via the nixos module and the other is via installing gns3-gui using home-manager.

# running via cli as normal user
ubridge       
uBridge version 0.9.18 running with libpcap version 1.10.4 (with TPACKET_V3)
iniparser: cannot open ubridge.ini

EDIT: Previously I was using this config and it worked.

    environment.systemPackages = with pkgs; [ gns3-server ubridge ];
    users.groups.ubridge = { };
    users.users.${user.name}.extraGroups = [ "ubridge" ];
    security.wrappers.ubridge = {
      source = "${pkgs.ubridge}/bin/ubridge";
      capabilities = "cap_net_admin,cap_net_raw=ep";
      owner = "root";
      group = "ubridge";
      permissions = "u+rx,g+rx,o+rx";
    };

Notify maintainers

@anthonyroussel

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.35, NixOS, 24.05 (Uakari), 24.05.20240623.e4509b3`
 - multi-user?: `yes`
 - sandbox: `relaxed`
 - version: `nix-env (Nix) 2.22.1`
 - nixpkgs: `/etc/nix/inputs/nixpkgs`

Add a 👍 reaction to issues you find important.

@anthonyroussel
Copy link
Member

anthonyroussel commented Jun 25, 2024

Hello !
Thanks for reporting this issue.
I believe this is a duplicate of #292258.
This PR #303442 should fix your issue with the broken gns3 / ubridge integration.
The PR is waiting for a final review, and a sponsor with merge rights.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants