Gentoo Archives: gentoo-user

From: Grant Taylor <gtaylor@×××××××××××××××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [OT] Best *SIMPLE* firewall?
Date: Fri, 02 Mar 2018 23:34:17
Message-Id: 200f4403-0818-569e-471a-edcc2cfc7723@spamtrap.tnetconsulting.net
In Reply to: Re: [gentoo-user] [OT] Best *SIMPLE* firewall? by Rich Freeman
1 On 03/02/2018 05:08 AM, Rich Freeman wrote:
2 > On the other hand, if netfilter were implemented in userspace such as
3 > via a microkernel, then if it contained a bug the remote attacker would
4 > be able to MITM all network traffic on the machine, but that would
5 > be the extent of the access they have.
6
7 I don't know that it would be the extent of the access the attacker
8 would have. It might also be a beachhead that could be used as a
9 starting point for future attacks.
10
11 > The process running the netfilter code doesn't need anything other than
12 > a pipe back to the kernel to receive packets and send packets back,
13 > so it can run with minimal privs otherwise.
14
15 I think that more than a simple pipe (as in unix socket) is needed.
16 Currently, any program that uses IP is expecting a socket to behave like
17 it currently behaves. I don't think a simple pipe can provide that.
18
19 I can see a way now, using existing technology, to have an isolated
20 firewall that runs in user space. Remove all IP processing from eth0 in
21 the main kernel. Connect eth0 to a User Mode Linux kernel which does
22 the filtering (in user space) and routes the traffic back over another
23 connection to the host kernel, i.e. uml0.
24
25 +-----------------------------+
26 | Host |
27 | +--------------+ |
28 | | UML Firewall | |
29 -----+ eth0 eth1 +---uml0 |
30 | +--------------+ |
31 +-----------------------------+
32
33 Processes running on the host can use the uml0 interface just like they
34 formerly used the eth0 interface.
35
36 All the firewalling / filtering / routing happens in user space
37 (possibly a container) and independent of the host kernel.
38
39 > a lot of the boot-time mounting logic and devfs/etc logic has gone away
40 > in favor of initramfs and udev.
41
42 Please provide examples of this "…boot-time mounting logic and devfs/etc
43 logic…" that used to be in kernel.
44
45 I'll argue that devfs is now in kernel when it used to be files on a
46 file system or dynamically created by a user space process. As far as I
47 know, mounting (more than root as RO) has always been driven from user
48 space via init scripts.
49
50 Sure, there's a LOT of changes going on in that space, particularly
51 around (anti)systemd. But IMHO this has been user space for as long as
52 I have known.
53
54 Please provide examples where I'm wrong. I'd like to learn.
55
56 > And of course if this is done it is done correctly, and not as some kind
57 > of userspace hack on top of an OS to add features that it lacks.
58
59 ???
60
61
62
63 --
64 Grant. . . .
65 unix || die

Replies

Subject Author
Re: [gentoo-user] [OT] Best *SIMPLE* firewall? Rich Freeman <rich0@g.o>