Skip to content

Instantly share code, notes, and snippets.

@IchHabRecht
Created August 21, 2013 20:50
Show Gist options
  • Save IchHabRecht/6300091 to your computer and use it in GitHub Desktop.
Save IchHabRecht/6300091 to your computer and use it in GitHub Desktop.
[BASH] Chroot bind9
/etc/init.d/bind9 stop
mkdir -p /var/chroot/bind9/{etc,dev,var/cache/bind,var/run/bind/run}
chown -R bind:bind /var/chroot/bind9/var/*
mknod /var/chroot/bind9/dev/null c 1 3
mknod /var/chroot/bind9/dev/random c 1 8
chmod 666 /var/chroot/bind9/dev/{null,random}
mv /etc/bind /var/chroot/bind9/etc
ln -s /var/chroot/bind9/etc/bind /etc/bind
chown -R bind:bind /etc/bind/*
nano /etc/default/bind9
/etc/init.d/bind9 start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment