You are not logged in.

#1 2013-01-28 14:59:27

skink
Member
Registered: 2013-01-28
Posts: 3

How to configure BIND (chroot) with systemd

Hello,

I'm following guide https://wiki.archlinux.org/index.php/BIND_(chroot). In the end there is only said how to enable service in sysvinit environment. Could someone please tell me how to do this with systemd?

Thanks

Offline

#2 2013-01-29 16:56:07

chris_l
Member
Registered: 2010-12-01
Posts: 390

Re: How to configure BIND (chroot) with systemd

It seems that is an alternate init script, created by an user. Is not an "official" way to do it. What is necessary is someone willing create a new way for doing it under systemd.

Are you that person?

Read about creating systemd services (man systemd.service and man systemd.unit) and create an script that is going to be called by the service (probably you can take that init script as a base). Once you do, update that wiki article.

Having said that... probably that contribution would be more fitting for an AUR package + how to install it under the Tips and tricks section of the main BIND article instead.


"open source is about choice"
No.
Open source is about opening the source code complying with this conditions, period. The ability to choose among several packages is just a nice side effect.

Offline

#3 2014-03-18 13:12:05

toogy
Member
Registered: 2013-10-25
Posts: 41

Re: How to configure BIND (chroot) with systemd

I update the topic: no one created a systemd service for bind9?


water vapor is invisible

Offline

#4 2014-03-18 13:51:28

scar
Member
From: Hungary
Registered: 2009-10-01
Posts: 442

Re: How to configure BIND (chroot) with systemd

@toogy: what do you mean exactly by creating a systemd service?

EDIT: for example, I've this one (in /etc/systemd/system/mynamed.service)

[Unit]
Description=Internet domain name server
After=network.target

[Service]
ExecStart=/usr/bin/named -f -u named -4
ExecReload=/usr/bin/rndc reload
ExecStop=/usr/bin/rndc stop

[Install]
WantedBy=multi-user.target

And according to 'man named', you can use the '-t' parameter if you want named to run in a chroot (I've never tried it):

 -t directory: Chroot to directory after processing the command line arguments, but before reading the configuration file.
                  Warning: This option should be used in conjunction with the -u option, as chrooting a process running as root doesn't enhance security on most systems; the way chroot(2) is defined allows a process with root privileges to escape a chroot jail.

Last edited by scar (2014-03-18 16:24:55)


“The future has already arrived. It's just not evenly distributed yet.”
― William Gibson

Offline

#5 2014-03-19 06:26:57

toogy
Member
Registered: 2013-10-25
Posts: 41

Re: How to configure BIND (chroot) with systemd

Well my problem is solved. Something wasn't understanding... ^^


water vapor is invisible

Offline

#6 2014-04-07 21:21:20

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: How to configure BIND (chroot) with systemd

this is an old thread. please do not necrobump.

Closing..


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

Board footer

Powered by FluxBB