Re: [gentoo-user] VRFs / Jails / Containers

2019-02-05 Thread Grant Taylor
On 2/5/19 10:55 AM, Rich Freeman wrote: Yeah, I think you're over-reading into my posts. I'm mostly reacting to your ideas and not trying to be prescriptive. So we have a feedback loop. I'm trying to understand why you're saying what you're saying. I'm still looking for possibilities and

Re: [gentoo-user] VRFs / Jails / Containers

2019-02-05 Thread Rich Freeman
On Mon, Feb 4, 2019 at 7:10 PM Grant Taylor wrote: > > On 02/04/2019 02:58 PM, Rich Freeman wrote: > > So, I think we're miscommunicating a bit here... > > It happens. > Yeah, I think you're over-reading into my posts. I'm mostly reacting to your ideas and not trying to be prescriptive. For

Re: [gentoo-user] VRFs / Jails / Containers

2019-02-05 Thread Michael Orlitzky
On 2/4/19 3:50 PM, Grant Taylor wrote: > On 02/03/2019 11:23 AM, Michael Orlitzky wrote: >> Ultimately netifrc is just a shell script that parses another shell >> script to construct a third shell script. I don't think doing it with >> only two shell scripts is that much less elegant =) > > The

Re: [gentoo-user] VRFs / Jails / Containers

2019-02-04 Thread Grant Taylor
On 02/04/2019 02:58 PM, Rich Freeman wrote: So, I think we're miscommunicating a bit here... It happens. I'm saying that an init.d script shouldn't try to do anything other than initialize a service, which should be implemented outside the init.d script. It sounds like you are saying that

Re: [gentoo-user] VRFs / Jails / Containers

2019-02-04 Thread Grant Taylor
On 2/4/19 5:10 PM, Grant Taylor wrote: Consider the following commands to start the ""container: ip netns add myContainer ip link add myContainer type veth peer name myHost netns myContainer ip link set myContainer up ip addr add 192.0.2.1/24 dev myContainer ip netns exec myContainer ip link

Re: [gentoo-user] VRFs / Jails / Containers

2019-02-04 Thread Rich Freeman
So, I think we're miscommunicating a bit here... On Mon, Feb 4, 2019 at 4:10 PM Grant Taylor wrote: > > On 02/04/2019 11:55 AM, Rich Freeman wrote: > > IMO I would separate your container logic from your service manager logic. > > I'm not exactly sure what you mean by "container logic" vs

Re: [gentoo-user] VRFs / Jails / Containers

2019-02-04 Thread Grant Taylor
On 02/04/2019 11:55 AM, Rich Freeman wrote: IMO I would separate your container logic from your service manager logic. I'm not exactly sure what you mean by "container logic" vs "service manager logic" and how they differ. I'm assuming that the former creates / destroys the container and

Re: [gentoo-user] VRFs / Jails / Containers

2019-02-04 Thread Grant Taylor
On 02/03/2019 11:23 AM, Michael Orlitzky wrote: Ultimately netifrc is just a shell script that parses another shell script to construct a third shell script. I don't think doing it with only two shell scripts is that much less elegant =) The elegance, or lack there of, is not in the number of

Re: [gentoo-user] VRFs / Jails / Containers

2019-02-04 Thread Rich Freeman
On Mon, Feb 4, 2019 at 1:44 PM Grant Taylor wrote: > > I'm starting to wonder if I'm going to be better off writing new scripts > that will match existing init scripts and their methodology to > (re)start/stop namespaces / containers / jails. Perhaps firejail will > give me what I want or

Re: [gentoo-user] VRFs / Jails / Containers

2019-02-04 Thread Grant Taylor
On 02/04/2019 09:23 AM, Laurence Perkins wrote: Have you tried firejail? It gives you convenient ways to set up the container parameters consistently and is in the repo. No, I have not. Thank you for the pointer. Its invocation is also simple enough to not clutter up your startup scripts.

Re: [gentoo-user] VRFs / Jails / Containers

2019-02-04 Thread Laurence Perkins
On Sat, 2019-02-02 at 19:32 -0700, Grant Taylor wrote: > Does Gentoo have any support for VRFs or (chroot) Jails or > Containers > without going down the Docker (et al) path? > > I'm wanting to do some things with a Gentoo router that is trivial to > do > with network namespaces via manual

Re: [gentoo-user] VRFs / Jails / Containers

2019-02-03 Thread Michael Orlitzky
On 2/3/19 12:39 PM, Grant Taylor wrote: On 2/3/19 6:26 AM, Michael Orlitzky wrote: You can add commands to your existing network configuration that will be run when an interface comes up. For example, in /etc/conf.d/net,   ifup_wlan0="iwconfig \$int key s:secretkey enc open essid foobar"

Re: [gentoo-user] VRFs / Jails / Containers

2019-02-03 Thread Grant Taylor
On 2/3/19 6:26 AM, Michael Orlitzky wrote: You can add commands to your existing network configuration that will be run when an interface comes up. For example, in /etc/conf.d/net,   ifup_wlan0="iwconfig \$int key s:secretkey enc open essid foobar" Ya I find that to be an absolute

Re: [gentoo-user] VRFs / Jails / Containers

2019-02-03 Thread Grant Taylor
On 2/3/19 1:50 AM, Alarig Le Lay wrote: For the VRF part, Gentoo supports it; it’s in the upstream kernel sources. Yep. I've been doing Network Namespaces, and VRF to a lesser degree, for quite a while now. It's just all been manual or ad-hock scripts. I only tried it once, but failed

Re: [gentoo-user] VRFs / Jails / Containers

2019-02-03 Thread Grant Taylor
On 2/2/19 11:09 PM, Bill Kenworthy wrote: I am unclear on what you are trying to do. See my reply to Rich's message for a description. I find the gentoo scripts good for the simple case but a complex case almost always needs extra help. Yep. I was hoping that there was something that I

Re: [gentoo-user] VRFs / Jails / Containers

2019-02-03 Thread Grant Taylor
On 2/3/19 5:37 AM, Rich Freeman wrote: Nothing wrong with that approach. I use systemd-nspawn to run a bunch of containers, hosted in Gentoo, and many of which run Gentoo. However, these all run systemd and I don't believe you can run nspawn without a systemd host (the guest/container can be

Re: [gentoo-user] VRFs / Jails / Containers

2019-02-03 Thread Michael Orlitzky
On 2/2/19 10:56 PM, Grant Taylor wrote: On 2/2/19 7:36 PM, Bill Kenworthy wrote: LXC containers ?? Maybe. I just feel like that's more heavy weight than I want. I'm functionally running a series of ip commands to configure networking in a special way. You can add commands to your

Re: [gentoo-user] VRFs / Jails / Containers

2019-02-03 Thread Rich Freeman
On Sat, Feb 2, 2019 at 11:52 PM Grant Taylor wrote: > > On 2/2/19 9:39 PM, Michael Jones wrote: > > systemd-nspawn is also an option, but I don't think that'll work with > > OpenRC. > > Ya I moved (back to) Gentoo to get away from systemd. I'm not > going to voluntarily opt to use it, or

Re: [gentoo-user] VRFs / Jails / Containers

2019-02-03 Thread Alarig Le Lay
For the VRF part, Gentoo supports it; it’s in the upstream kernel sources. I only tried it once, but failed because my sshd should have been lunch in my VRF and I didn’t quickly find a way to do it. But otherwise, it worked. -- Alarig

Re: [gentoo-user] VRFs / Jails / Containers

2019-02-02 Thread Bill Kenworthy
On 3/2/19 12:52 pm, Grant Taylor wrote: > On 2/2/19 9:39 PM, Michael Jones wrote: >> systemd-nspawn is also an option, but I don't think that'll work with >> OpenRC. > > Ya  I moved (back to) Gentoo to get away from systemd.  I'm not > going to voluntarily opt to use it, or any of it's

Re: [gentoo-user] VRFs / Jails / Containers

2019-02-02 Thread Grant Taylor
On 2/2/19 9:39 PM, Michael Jones wrote: systemd-nspawn is also an option, but I don't think that'll work with OpenRC. Ya I moved (back to) Gentoo to get away from systemd. I'm not going to voluntarily opt to use it, or any of it's children. That's /my/ opinion. I know others opinions

Re: [gentoo-user] VRFs / Jails / Containers

2019-02-02 Thread Michael Jones
systemd-nspawn is also an option, but I don't think that'll work with OpenRC. On Sat, Feb 2, 2019 at 9:56 PM Grant Taylor < gtay...@gentoo.tnetconsulting.net> wrote: > On 2/2/19 7:36 PM, Bill Kenworthy wrote: > > LXC containers ?? > > Maybe. > > I just feel like that's more heavy weight than I

Re: [gentoo-user] VRFs / Jails / Containers

2019-02-02 Thread Grant Taylor
On 2/2/19 7:36 PM, Bill Kenworthy wrote: LXC containers ?? Maybe. I just feel like that's more heavy weight than I want. I'm functionally running a series of ip commands to configure networking in a special way. Maybe I should look into what it takes to extend netifrc to support what I

Re: [gentoo-user] VRFs / Jails / Containers

2019-02-02 Thread Bill Kenworthy
On 3/2/19 10:32 am, Grant Taylor wrote: > Does Gentoo have any support for VRFs or (chroot) Jails or Containers > without going down the Docker (et al) path? > > I'm wanting to do some things with a Gentoo router that is trivial to > do with network namespaces via manual commands ~> scripts.  But