From nix-dev Sun Feb 25 11:32:25 2018 From: Arnold Krille Date: Sun, 25 Feb 2018 11:32:25 +0000 To: nix-dev Subject: Re: [nix-devel] NixOS Container Bridge Networking Message-Id: <20180225123225.19036e94 () xingu ! arnoldarts ! de> X-MARC-Message: https://marc.info/?l=nix-dev&m=151955835432277 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--Sig_/jZQ7pMVxqYU6OqIZEtWDqgx" --Sig_/jZQ7pMVxqYU6OqIZEtWDqgx Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Sat, 24 Feb 2018 18:04:04 -0500 Mark Gardner wrote: > I am trying to use a nixos container to contain the unifi controller. > I was able to create the container imperatively via: >=20 > nixos-container create unifi --config " > nixpkgs.config.allowUnfree =3D true; > services.unifi =3D { > enable =3D true; > }; > " >=20 > But the networking is private. Ports have to be made available so the > Unifi AP can talk to the controller. I used NAT as outlined in > section 28.3 of the NixOS manual and it works for this case. But this > isn't completely satisfactory as I may wish to have multiple > containers that listen on the same port (:80 for instance). So what I > would rather have is the containers use a bridge for networking so > they have their own IP addresses and hence can listen on the same > port. >=20 > How would I do that? Did you take a look at the tests for containers and networking, including containers and bridges? https://github.com/NixOS/nixpkgs/blob/release-17.09/nixos/tests/containers-= bridge.nix Might help to see how it works / is supposed to work. And its a working example as the channel shouldn't update if that is broken=E2=80=A6 - Arnold --=20 You received this message because you are subscribed to the Google Groups "= nix-devel" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to nix-devel+unsubscribe@googlegroups.com. To post to this group, send email to nix-devel@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/= nix-devel/20180225123225.19036e94%40xingu.arnoldarts.de. For more options, visit https://groups.google.com/d/optout. --Sig_/jZQ7pMVxqYU6OqIZEtWDqgx Content-Type: application/pgp-signature Content-Description: Digitale Signatur von OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iF4EAREIAAYFAlqSnskACgkQtuvagsE+DE6gqQEA6uwhAFbLP9Ujmi1+NFOf4wYH 2243EhhQ989jplIOV9wA/3wm3FYfm8iXLglbSkvQTzvMloHWzLwLlIYuT7mO5V9P =PRuq -----END PGP SIGNATURE----- --Sig_/jZQ7pMVxqYU6OqIZEtWDqgx--