3
0
Fork 0
forked from mirrors/nixpkgs
Nix Packages collection
Go to file
Eelco Dolstra 895bcdd1cb Add support for running a container with a private network interface
For example, the following sets up a container named ‘foo’.  The
container will have a single network interface eth0, with IP address
10.231.136.2.  The host will have an interface c-foo with IP address
10.231.136.1.

  systemd.containers.foo =
    { privateNetwork = true;
      hostAddress = "10.231.136.1";
      localAddress = "10.231.136.2";
      config =
        { services.openssh.enable = true; };
    };

With ‘privateNetwork = true’, the container has the CAP_NET_ADMIN
capability, allowing it to do arbitrary network configuration, such as
setting up firewall rules.  This is secure because it cannot touch the
interfaces of the host.

The helper program ‘run-in-netns’ is needed at the moment because ‘ip
netns exec’ doesn't quite do the right thing (it remounts /sys without
bind-mounting the original /sys/fs/cgroups).
2014-03-18 10:49:25 +01:00
doc Merge pull request #1815 from vcunat/p/doc-package-naming 2014-03-04 23:41:35 +01:00
lib Merge branch 'pr-wqy' of git://github.com/PkmX/nixpkgs 2014-03-15 13:22:31 -04:00
maintainers/scripts Fix updating of the tarball mirror 2014-02-19 13:58:42 +01:00
nixos Add support for running a container with a private network interface 2014-03-18 10:49:25 +01:00
pkgs Explicitly require Nix 1.6 2014-03-17 11:33:36 +01:00
.gitignore Merge .gitignore files 2013-10-10 13:28:22 +02:00
.version Bump the overly optimistic version number 2014-02-28 16:56:32 +01:00
COPYING * Applying an MIT-style license to Nixpkgs. 2006-04-25 16:50:34 +00:00
default.nix Explicitly require Nix 1.6 2014-03-17 11:33:36 +01:00
README.md Fixed link to the installation instructions 2014-02-27 14:57:28 +01:00

Nixpkgs is a collection of packages for Nix package manager. Nixpkgs also includes NixOS linux distribution source code.