!tCyGickeVqkHsYjWnh:nixos.org

NixOS Networking

915 Members
Declaratively manage your switching, routing, wireless, tunneling and more.275 Servers

Load older messages


SenderMessageTime
17 Aug 2021
@eyjhb:eyjhb.dkeyJhbAlso recommend looking at nftables instead of iptables. I still do suck at it, but there are some experts in here, as well as some people in #netfilter on Libera that are very nice! 15:28:26
@hexa:lossy.networkhexaI do love ferm, but it's "stuck" with iptables15:52:22
@hexa:lossy.networkhexaIt has the most convenient syntactic sugar15:52:45
@hexa:lossy.networkhexaI am using plain nft these days and it has lots of rough edges15:53:29
@hexa:lossy.networkhexaNot really sure if my only benefit is learning nft πŸ˜…15:54:25
@andi:kack.itandi-Testing nft is a pain. The whole story around verifying your file is syntactically correct already sucks. 15:55:36
@schnecfk:ruhr-uni-bochum.deCRTifiedJust for clarification: it looks like nftables is intended to replace iptables/arptables and more in the long run, correct? If that's the case, it's probably a good idea to start using it and to get used to it15:56:30
@hexa:lossy.networkhexaComposing it in nixos is also not straight-forward, the module is lacking15:56:49
@andi:kack.itandi-
In reply to @schnecfk:ruhr-uni-bochum.de
Just for clarification: it looks like nftables is intended to replace iptables/arptables and more in the long run, correct? If that's the case, it's probably a good idea to start using it and to get used to it
iptables is already using it under the hood.
15:56:50
@hexa:lossy.networkhexaThere is the iptables-nft wrapper ^15:57:19
@schnecfk:ruhr-uni-bochum.deCRTified
In reply to @andi:kack.it
iptables is already using it under the hood.
THen the question is whether that compatibility layer is intended to stay, or whether it'll be deprecated some day
16:05:53
@andi:kack.itandi-I am sure it'll stay for some 10 years..16:06:25
@andi:kack.itandi-Or a RHEL lifecycle16:06:34
@schnecfk:ruhr-uni-bochum.deCRTifiedYes, that's likely the case, but on the other hand it's probably a good idea to start early so that the transition won't be in a hurry (or one has at least a small bit of experience with it)16:07:49
@eyjhb:eyjhb.dkeyJhb andi-: wasn't it you that provided the checking of nftables ? 16:12:13
@eyjhb:eyjhb.dkeyJhb
  verifiedNetfilter = { text, modules ? [ ] }:
    let
      file = pkgs.writeText "netfilter" text;
      vmTools = pkgs.vmTools.override {
        rootModules =
          [
            "virtio_pci"
            "virtio_mmio"
            "virtio_blk"
            "virtio_balloon"
            "virtio_rng"
            "ext4"
            "unix"
            "9p"
            "9pnet_virtio"
            "crc32c_generic"
          ] ++ modules;
      };

      check = vmTools.runInLinuxVM (
        pkgs.runCommand "nft-check"
          {
            buildInputs = [ pkgs.nftables ];
            inherit file;
          } ''
          set -ex
          # make sure protocols & services are known
          ln -s ${pkgs.iana-etc}/etc/protocol /etc/protocol
          ln -s ${pkgs.iana-etc}/etc/services /etc/services
          # test the configuration
          nft --file $file
          set +x
        ''
      );
    in
    "#checked with ${check}\n" + text;

this beauty

16:12:41
@andi:kack.itandi-yeah16:18:57
@janne.hess:helsinki-systems.dedas_j joined the room.16:25:23
@janne.hess:helsinki-systems.dedas_joof is this really the only way? :/16:25:57
@janne.hess:helsinki-systems.dedas_j changed their display name from Janne Heß to das_j.16:26:13
@andi:kack.itandi-Another reason to use nft: It does support hardware offloading of rules via TC flower16:30:24
@andi:kack.itandi-and a surprising amount of nics seem to support that at least partially16:30:35
@andi:kack.itandi-mlx5 and some random mediatek device support flow table offloading16:32:14
@linus.heckemann:matrix.mayflower.deLinux Hackermanoh wow16:32:21
@linus.heckemann:matrix.mayflower.deLinux HackermanOn the one hand, I love that we have stuff like runInLinuxVM. On the other, I hate that it's necessary for this πŸ˜…16:32:51
@andi:kack.itandi-I think you can remove the kernel modules part above but then the closure is bigger. IIRC I copied the modules from our VM tests16:33:15
@andi:kack.itandi-Unfortunately the code looks like it aborts if you request hw offloading instead of falling back to the software implementation16:43:42
@andi:kack.itandi-so, I kinda want to replace my APU2 with something that has an mlx5 now.16:46:48
@janne.hess:helsinki-systems.dedas_jAh can you tell me when you find something good? Because I have an APU2 as well and I would also prefer something with offloading16:48:23
@nixinator:nixos.devnixinatorwhere can i read about flow offloading?16:48:37

Show newer messages


Back to Room ListRoom Version: 6