all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Bonface M. K." <bonfacemunyoki@gmail.com>
To: "Zhu Zihao" <all_but_last@163.com>
Cc: "help-guix@gnu.org" <help-guix@gnu.org>
Subject: Re: Port forwarding for Guix containers
Date: Fri, 20 Nov 2020 21:44:08 +0300	[thread overview]
Message-ID: <86mtzb98cn.fsf@gmail.com> (raw)
In-Reply-To: <28690cfe.8dc4.175e13a4596.Coremail.all_but_last@163.com> (Zhu Zihao's message of "Thu, 19 Nov 2020 23:58:13 +0800 (CST)")

[-- Attachment #1: Type: text/plain, Size: 1425 bytes --]

"Zhu Zihao" <all_but_last@163.com> writes:

> Hi, Guix users!
>
>
> I found guix container "created by `guix
> environment --container` or `guix system
> container`" is very useful to isolate some
> service. But it only supports fully isolated
> network namespace or just share with host, it's
> not so safe IMO.
>
>
>
> In Docker, there's port forwarding, allows you to
> share some ports of Guix container with host. I
> just learn something about docker's network
> mechanism, it looks quite complicated. It use veth
> pair, network bridge and even iptables. Is there
> some idiomatic way to implement such port
> forwarding feature for Guix containers?
>
>
> Any answer or suggestions are appreicated.
>

I don't know if this is helpful, but you could
start a container with network access by passing
the "-N" flag. Here's an example:

--8<---------------cut here---------------start------------->8---
./pre-inst-env guix environment -N --ad-hoc wget -- wget "some-url"
--8<---------------cut here---------------end--------------->8---

I don't know if this is feasible, but you could
try using some third party tool to limit ports
from _inside_ the container...

HTH!

-- 
Bonface M. K. <https://www.bonfacemunyoki.com>
Chief Emacs Bazu / Rieng ya software sare
Mchochezi of: <https://upbookclub.com> / Twitter: @BonfaceKilz
GPG Key: D4F09EB110177E03C28E2FE1F5BBAE1E0392253F

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 869 bytes --]

  reply	other threads:[~2020-11-20 18:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19 15:58 Port forwarding for Guix containers Zhu Zihao
2020-11-20 18:44 ` Bonface M. K. [this message]
2020-11-20 19:26 ` Christopher Baines
2020-11-21 14:53   ` zimoun
2020-11-21 20:20     ` Edouard Klein
2020-11-21 21:45     ` Jason Conroy
2020-11-22 15:09       ` edk
2020-11-23 14:58         ` Jason Conroy
2020-11-23 16:16       ` Zhu Zihao
2020-11-23 16:21       ` Zhu Zihao
2020-11-25 16:14         ` Jason Conroy
2020-12-03  9:32           ` Zhu Zihao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86mtzb98cn.fsf@gmail.com \
    --to=bonfacemunyoki@gmail.com \
    --cc=all_but_last@163.com \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.