unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Brice Waegeneire <brice@waegenei.re>
To: 49540@debbugs.gnu.org
Cc: iyzsong@member.fsf.org, solene@perso.pw
Subject: [bug#49540] [PATCH 0/2] services: nftables: Make it extandable
Date: Mon, 12 Jul 2021 23:05:43 +0200	[thread overview]
Message-ID: <20210712210543.16598-1-brice@waegenei.re> (raw)

This patchset make "nftables-service-type" extendable, so other services could
open port.  I wrote this to be able to use libvirt with nftables (another
patch is comming about that) like this:

--8<---------------cut here---------------start------------->8---
(simple-service 'nftables-libvirt nftables-service-type
                   (list "# Libvirt?
add rule inet guix forward ct state established,related accept
add rule inet guix forward iifname \"virbr*\" accept

add chain inet guix libvirt
insert rule inet guix input iifname \"virbr*\" jump libvirt
insert rule inet guix libvirt udp dport 53 accept
insert rule inet guix libvirt tcp dport 53 accept
insert rule inet guix libvirt udp dport 67 accept
"))
--8<---------------cut here---------------end--------------->8---

So this should make it possible to implement Solene's
"simple-firewall-service"¹ by simply extending "nftables-service-type".

Also, now, stopping nftables only remove the "guix" table so other software
can use their own namespaces without being purged when that service is
stopped.

WDYT?

¹ <https://issues.guix.gnu.org/48975>

Brice Waegeneire (2): services: nftables: Only manage delete our
own table.  services: nftables: Make it extendable.

 gnu/services/networking.scm | 51 +++++++++++++++++++++++++++++--------
 1 file changed, 41 insertions(+), 10 deletions(-)

-- 
2.31.1





             reply	other threads:[~2021-07-12 21:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-12 21:05 Brice Waegeneire [this message]
2021-07-12 21:08 ` [bug#49540] [PATCH 1/2] services: nftables: Only manage delete our own table Brice Waegeneire
2021-07-12 21:08 ` [bug#49540] [PATCH 2/2] services: nftables: Make it extendable Brice Waegeneire

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=20210712210543.16598-1-brice@waegenei.re \
    --to=brice@waegenei.re \
    --cc=49540@debbugs.gnu.org \
    --cc=iyzsong@member.fsf.org \
    --cc=solene@perso.pw \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).