Loading configuration file /etc/makejail Defining keepStraceOutputs = 1 Loading configuration file examples/bind.py Defining forceCopy = ['/etc/bind/*', '/var/cache/bind'] Defining processNames = ['named'] Defining testCommandsOutsideJail = ['dig @127.0.0.1 yahoo.com', 'dig @127.0.0.1 -x 127.0.0.1', 'dig @127.0.0.1 -x 198.186.203.20', 'ping -c 1 www.google.com'] Defining chroot = '/var/chroot/bind' Defining testCommandsInsideJail = ['start-stop-daemon --start --quiet --pidfile /var/run/named.pid --exec /usr/sbin/named'] Defining preserve = ['/var/cache/bind'] Chroot directory is /var/chroot/bind Initializing list of running processes Killing processes named 'named' ... : no process found Cleaning jail Entering directory /var/chroot/bind Entering directory /var/chroot/bind/etc Entering directory /var/chroot/bind/etc/bind Queuing for remove /var/chroot/bind/etc/bind/db.127 Queuing for remove /var/chroot/bind/etc/bind/db.0 Queuing for remove /var/chroot/bind/etc/bind/named.conf Queuing for remove /var/chroot/bind/etc/bind/db.255 Queuing for remove /var/chroot/bind/etc/bind/db.local Queuing for remove /var/chroot/bind/etc/bind/db.root Queuing for remove /var/chroot/bind/etc/bind/rndc.key Queuing for remove /var/chroot/bind/etc/bind/rndc.conf Queuing for remove /var/chroot/bind/etc/bind Queuing for remove /var/chroot/bind/etc Entering directory /var/chroot/bind/var Entering directory /var/chroot/bind/var/cache Preserving /var/chroot/bind/var/cache/bind Not queueing for remove /var/chroot/bind/var/cache, some paths to preserve below Not queueing for remove /var/chroot/bind/var, some paths to preserve below Entering directory /var/chroot/bind/sbin Queuing for remove /var/chroot/bind/sbin/start-stop-daemon Queuing for remove /var/chroot/bind/sbin Entering directory /var/chroot/bind/lib Queuing for remove /var/chroot/bind/lib/libc-2.2.5.so Queuing for remove /var/chroot/bind/lib/ld-2.2.5.so Queuing for remove /var/chroot/bind/lib/ld-linux.so.2 Queuing for remove /var/chroot/bind/lib/libc.so.6 Queuing for remove /var/chroot/bind/lib Removing 17 files in queue Removing /var/chroot/bind/etc/bind/db.127 Removing /var/chroot/bind/etc/bind/db.0 Removing /var/chroot/bind/etc/bind/named.conf Removing /var/chroot/bind/etc/bind/db.255 Removing /var/chroot/bind/etc/bind/db.local Removing /var/chroot/bind/etc/bind/db.root Removing /var/chroot/bind/etc/bind/rndc.key Removing /var/chroot/bind/etc/bind/rndc.conf Removing /var/chroot/bind/etc/bind Removing /var/chroot/bind/etc Removing /var/chroot/bind/sbin/start-stop-daemon Removing /var/chroot/bind/sbin Removing /var/chroot/bind/lib/libc-2.2.5.so Removing /var/chroot/bind/lib/ld-2.2.5.so Removing /var/chroot/bind/lib/ld-linux.so.2 Removing /var/chroot/bind/lib/libc.so.6 Removing /var/chroot/bind/lib Adding files matching '/etc/bind/*' Checking path '/etc/bind/db.127' Dir '/var/chroot/bind/etc' missing Checking path '/etc' Making dir /var/chroot/bind/etc Dir '/var/chroot/bind/etc/bind' missing Checking path '/etc/bind' Making dir /var/chroot/bind/etc/bind Copying /etc/bind/db.127 -> /var/chroot/bind/etc/bind/db.127 Checking path '/etc/bind/db.0' Copying /etc/bind/db.0 -> /var/chroot/bind/etc/bind/db.0 Checking path '/etc/bind/named.conf' Copying /etc/bind/named.conf -> /var/chroot/bind/etc/bind/named.conf Checking path '/etc/bind/db.255' Copying /etc/bind/db.255 -> /var/chroot/bind/etc/bind/db.255 Checking path '/etc/bind/db.local' Copying /etc/bind/db.local -> /var/chroot/bind/etc/bind/db.local Checking path '/etc/bind/db.root' Copying /etc/bind/db.root -> /var/chroot/bind/etc/bind/db.root Checking path '/etc/bind/rndc.key' Copying /etc/bind/rndc.key -> /var/chroot/bind/etc/bind/rndc.key Checking path '/etc/bind/rndc.conf' Copying /etc/bind/rndc.conf -> /var/chroot/bind/etc/bind/rndc.conf Adding files matching '/var/cache/bind' Checking path '/var/cache/bind' Dir /var/chroot/bind/var/cache/bind already exists Running strace on commands from inside jail Killing processes named 'named' ... : no process found Execution #1 Tracing command chroot /var/chroot/bind start-stop-daemon --start --quiet --pidfile /var/run/named.pid --exec /usr/sbin/named Sleeping for 2.00 seconds Stopping tracing ... strace: no process killed Looking for missing files in the trace file (available in /tmp/makejail_logs/@1795.1trace) Checking path '/sbin/start-stop-daemon' Dir '/var/chroot/bind/sbin' missing Checking path '/sbin' Making dir /var/chroot/bind/sbin Copying /sbin/start-stop-daemon -> /var/chroot/bind/sbin/start-stop-daemon dynamically linked, checking the required librairies with ldd Checking path '/lib/libc.so.6' Dir '/var/chroot/bind/lib' missing Checking path '/lib' Making dir /var/chroot/bind/lib '/lib/libc.so.6' is a symlink to 'libc-2.2.5.so' Checking path '/lib/libc-2.2.5.so' Copying /lib/libc-2.2.5.so -> /var/chroot/bind/lib/libc-2.2.5.so shared object, checking the required librairies with ldd Checking path '/lib/ld-linux.so.2' '/lib/ld-linux.so.2' is a symlink to 'ld-2.2.5.so' Checking path '/lib/ld-2.2.5.so' Copying /lib/ld-2.2.5.so -> /var/chroot/bind/lib/ld-2.2.5.so shared object, checking the required librairies with ldd statically linked Creating 'lib/ld-linux.so.2' as a symlink to 'ld-2.2.5.so' (pwd=/var/chroot/bind/lib) Creating 'lib/libc.so.6' as a symlink to 'libc-2.2.5.so' (pwd=/var/chroot/bind/lib) Killing processes named 'named' ... : no process found Execution #2 Tracing command chroot /var/chroot/bind start-stop-daemon --start --quiet --pidfile /var/run/named.pid --exec /usr/sbin/named Sleeping for 2.00 seconds Stopping tracing ... strace: no process killed Looking for missing files in the trace file (available in /tmp/makejail_logs/@1795.2trace) Checking path '/etc/ld.so.cache' Shared libs cache file /etc/ld.so.cache marked as needed, it will be generated at the end Checking path '/usr/sbin/named' Dir '/var/chroot/bind/usr' missing Checking path '/usr' Making dir /var/chroot/bind/usr Dir '/var/chroot/bind/usr/sbin' missing Checking path '/usr/sbin' Making dir /var/chroot/bind/usr/sbin Copying /usr/sbin/named -> /var/chroot/bind/usr/sbin/named dynamically linked, checking the required librairies with ldd Checking path '/usr/lib/liblwres.so.1' Dir '/var/chroot/bind/usr/lib' missing Checking path '/usr/lib' Making dir /var/chroot/bind/usr/lib '/usr/lib/liblwres.so.1' is a symlink to 'liblwres.so.1.1.0' Checking path '/usr/lib/liblwres.so.1.1.0' Copying /usr/lib/liblwres.so.1.1.0 -> /var/chroot/bind/usr/lib/liblwres.so.1.1.0 shared object, checking the required librairies with ldd Checking path '/lib/libnsl.so.1' '/lib/libnsl.so.1' is a symlink to 'libnsl-2.2.5.so' Checking path '/lib/libnsl-2.2.5.so' Copying /lib/libnsl-2.2.5.so -> /var/chroot/bind/lib/libnsl-2.2.5.so shared object, checking the required librairies with ldd Creating 'lib/libnsl.so.1' as a symlink to 'libnsl-2.2.5.so' (pwd=/var/chroot/bind/lib) Checking path '/lib/libpthread.so.0' '/lib/libpthread.so.0' is a symlink to 'libpthread-0.9.so' Checking path '/lib/libpthread-0.9.so' Copying /lib/libpthread-0.9.so -> /var/chroot/bind/lib/libpthread-0.9.so shared object, checking the required librairies with ldd Creating 'lib/libpthread.so.0' as a symlink to 'libpthread-0.9.so' (pwd=/var/chroot/bind/lib) Creating 'usr/lib/liblwres.so.1' as a symlink to 'liblwres.so.1.1.0' (pwd=/var/chroot/bind/usr/lib) Checking path '/usr/lib/libdns.so.5' '/usr/lib/libdns.so.5' is a symlink to 'libdns.so.5.0.0' Checking path '/usr/lib/libdns.so.5.0.0' Copying /usr/lib/libdns.so.5.0.0 -> /var/chroot/bind/usr/lib/libdns.so.5.0.0 shared object, checking the required librairies with ldd Creating 'usr/lib/libdns.so.5' as a symlink to 'libdns.so.5.0.0' (pwd=/var/chroot/bind/usr/lib) Checking path '/usr/lib/libcrypto.so.0.9.6' Copying /usr/lib/libcrypto.so.0.9.6 -> /var/chroot/bind/usr/lib/libcrypto.so.0.9.6 shared object, checking the required librairies with ldd Checking path '/lib/libdl.so.2' '/lib/libdl.so.2' is a symlink to 'libdl-2.2.5.so' Checking path '/lib/libdl-2.2.5.so' Copying /lib/libdl-2.2.5.so -> /var/chroot/bind/lib/libdl-2.2.5.so shared object, checking the required librairies with ldd Creating 'lib/libdl.so.2' as a symlink to 'libdl-2.2.5.so' (pwd=/var/chroot/bind/lib) Checking path '/usr/lib/libisccfg.so.0' '/usr/lib/libisccfg.so.0' is a symlink to 'libisccfg.so.0.0.0' Checking path '/usr/lib/libisccfg.so.0.0.0' Copying /usr/lib/libisccfg.so.0.0.0 -> /var/chroot/bind/usr/lib/libisccfg.so.0.0.0 shared object, checking the required librairies with ldd Creating 'usr/lib/libisccfg.so.0' as a symlink to 'libisccfg.so.0.0.0' (pwd=/var/chroot/bind/usr/lib) Checking path '/usr/lib/libisccc.so.0' '/usr/lib/libisccc.so.0' is a symlink to 'libisccc.so.0.0.0' Checking path '/usr/lib/libisccc.so.0.0.0' Copying /usr/lib/libisccc.so.0.0.0 -> /var/chroot/bind/usr/lib/libisccc.so.0.0.0 shared object, checking the required librairies with ldd Creating 'usr/lib/libisccc.so.0' as a symlink to 'libisccc.so.0.0.0' (pwd=/var/chroot/bind/usr/lib) Checking path '/usr/lib/libisc.so.4' '/usr/lib/libisc.so.4' is a symlink to 'libisc.so.4.0.0' Checking path '/usr/lib/libisc.so.4.0.0' Copying /usr/lib/libisc.so.4.0.0 -> /var/chroot/bind/usr/lib/libisc.so.4.0.0 shared object, checking the required librairies with ldd Creating 'usr/lib/libisc.so.4' as a symlink to 'libisc.so.4.0.0' (pwd=/var/chroot/bind/usr/lib) Killing processes named 'named' ... : no process found Execution #3 Tracing command chroot /var/chroot/bind start-stop-daemon --start --quiet --pidfile /var/run/named.pid --exec /usr/sbin/named Sleeping for 2.00 seconds Stopping tracing ... Looking for missing files in the trace file (available in /tmp/makejail_logs/@1795.3trace) Failed to connect to socket /dev/log, file exists Checking path '/dev/null' Dir '/var/chroot/bind/dev' missing Checking path '/dev' Making dir /var/chroot/bind/dev Creating character device /dev/null (major=1,minor=3) Checking path '/etc/localtime' '/etc/localtime' is a symlink to '/usr/share/zoneinfo/Europe/Paris' Checking path '/usr/share/zoneinfo/Europe/Paris' Dir '/var/chroot/bind/usr/share' missing Checking path '/usr/share' Making dir /var/chroot/bind/usr/share Dir '/var/chroot/bind/usr/share/zoneinfo' missing Checking path '/usr/share/zoneinfo' Making dir /var/chroot/bind/usr/share/zoneinfo Dir '/var/chroot/bind/usr/share/zoneinfo/Europe' missing Checking path '/usr/share/zoneinfo/Europe' Making dir /var/chroot/bind/usr/share/zoneinfo/Europe Copying /usr/share/zoneinfo/Europe/Paris -> /var/chroot/bind/usr/share/zoneinfo/Europe/Paris Creating 'etc/localtime' as a symlink to '/usr/share/zoneinfo/Europe/Paris' (pwd=/var/chroot/bind/etc) Checking path '/etc/mtab' Ignoring because of doNotCopy directive: /etc/mtab Checking path '/etc/fstab' Ignoring because of doNotCopy directive: /etc/fstab Checking path '/proc/cpuinfo' Adding files needed to mount and unmount /proc Creating directory /proc Checking path '/bin/mount' Dir '/var/chroot/bind/bin' missing Checking path '/bin' Making dir /var/chroot/bind/bin Copying /bin/mount -> /var/chroot/bind/bin/mount dynamically linked, checking the required librairies with ldd Checking path '/bin/umount' Copying /bin/umount -> /var/chroot/bind/bin/umount dynamically linked, checking the required librairies with ldd Mounting /proc /proc mounted successfully Checking path '/dev/random' Creating character device /dev/random (major=1,minor=8) Failed attempt at creating the file /var/run/named.pid Checking path '/var/run' Making dir /var/chroot/bind/var/run Killing processes named 'named' ... : 2045,2046,2047,2048,2049 Sleeping for 1.00 second Execution #4 Tracing command chroot /var/chroot/bind start-stop-daemon --start --quiet --pidfile /var/run/named.pid --exec /usr/sbin/named Sleeping for 2.00 seconds Stopping tracing ... Looking for missing files in the trace file (available in /tmp/makejail_logs/@1795.4trace) No missing file found Killing processes named 'named' ... : 2097,2098,2099,2100,2101 Sleeping for 1.00 second Executing command 'chroot /var/chroot/bind start-stop-daemon --start --quiet --pidfile /var/run/named.pid --exec /usr/sbin/named' (pwd=/tmp/makejail_logs) return code is 0 Running tests from outside the jail Execution #1 Sleeping for 2.00 seconds Tracing process 2114 Sleeping for 0.20 second Tracing process 2115 Sleeping for 0.20 second Tracing process 2116 Sleeping for 0.20 second Tracing process 2117 Sleeping for 0.20 second Tracing process 2118 Sleeping for 0.20 second Executing test command 'dig @127.0.0.1 yahoo.com' ... return code is 0 Sleeping for 2.00 seconds Executing test command 'dig @127.0.0.1 -x 127.0.0.1' ... return code is 0 Sleeping for 2.00 seconds Executing test command 'dig @127.0.0.1 -x 198.186.203.20' ... return code is 0 Sleeping for 2.00 seconds Executing test command 'ping -c 1 www.google.com' ... return code is 0 Sleeping for 2.00 seconds Stopping tracing ... Looking for missing files in the trace file (available in /tmp/makejail_logs/@1795.5trace) No missing file found Killing processes named 'named' ... : 2114,2115,2116,2117,2118 Sleeping for 1.00 second Executing command 'chroot /var/chroot/bind start-stop-daemon --start --quiet --pidfile /var/run/named.pid --exec /usr/sbin/named' (pwd=/tmp/makejail_logs) return code is 0 Killing processes named 'named' ... : 2168,2169,2170,2171 Sleeping for 1.00 second Executing command 'chroot /var/chroot/bind start-stop-daemon --start --quiet --pidfile /var/run/named.pid --exec /usr/sbin/named' (pwd=/tmp/makejail_logs) return code is 0 Generating /etc/ld.so.cache Checking path '/etc/ld.so.conf' Copying /etc/ld.so.conf -> /var/chroot/bind/etc/ld.so.conf Checking path '/sbin/ldconfig' Copying /sbin/ldconfig -> /var/chroot/bind/sbin/ldconfig Executing command 'chroot /var/chroot/bind /sbin/ldconfig' (pwd=/tmp/makejail_logs) return code is 0 Removing ldconfig from jail Removing file /var/chroot/bind/sbin/ldconfig WARNING: Attempt to access /dev/log, a socket used by syslogd. Some suggestions: - if your version of syslogd supports it you can tell it to listen to the additional socket /var/chroot/bind/dev/log, and put it in the configuration directive 'preserve' - use a syslog proxy like holelogd - configure the daemon to log into files instead through syslog WARNING: You'll need the filesystem procfs mounted as /var/chroot/bind/proc It's mounted now, I've left the files needed to mount and unmount it you should add this command to the script which starts the daemon: chroot /var/chroot/bind /bin/mount /proc and the same command with umount when the daemon stops