Skip navigation.

Lu cát

Action, Correction, Perfection !

DHCPD under OpenBSD

,

OpenBSD is really really secure ! It's enough and perfect to run a gateway, pf syntax is good and clear enough.
And it's a common problem with dhcpd under openbsd. OpenBSD dhcpd default using chroot but it still looking for /dev/bpf device and /,/var were mounted with nodev "dhcpd error message : Can't find free bpf". Then you should create chroot env for dhcpd to run.

the scope of this howto is just to simply chroot it.

mkdir -p /usr/chroot/dhcpd
mkdir -p /usr/chroot/dhcpd/dev
mkdir -p /usr/chroot/dhcpd/etc
mkdir -p /usr/chroot/dhcpd/usr/lib
mkdir -p /usr/chroot/dhcpd/usr/libexec
mkdir -p /usr/chroot/dhcpd/usr/local/sbin
mkdir -p /usr/chroot/dhcpd/usr/local/etc
mkdir -p /usr/chroot/dhcpd/var/db
mkdir -p /usr/chroot/dhcpd/var/run

mknod /usr/chroot/dhcpd/dev/null c 2 2
chown root:sys /chroot/dhcpd/dev/null 
chmod 666 /chroot/dhcpd/dev/null

BPF="`ls -l /dev/bpf0 | awk '{ print $5; }' | sed -e 's/,//g'`"
export BPF
cd /usr/chroot/dhcpd/dev 
mknod bpf0 c $BPF 0
mknod bpf1 c $BPF 1
chmod 0600 bpf*

cp /usr/lib/libc.so.5 /usr/chroot/dhcpd/usr/lib/libc.so.5
cp /usr/libexec/ld-elf.so.1 /usr/chroot/dhcpd/usr/libexec/ld-elf.so.1
cp /usr/local/etc/dhcpd.conf /usr/chroot/dhcpd/usr/local/etc/dhcpd.conf
cp /usr/local/sbin/dhcpd /usr/chroot/dhcpd/usr/local/sbin/dhcpd
cp /var/db/dhcpd* /usr/chroot/dhcpd/var/db/

now test it
chroot /usr/chroot/dhcpd /usr/local/sbin/dhcpd


Thanks to soup4you2

Testing Pgcluster 1.9rc5Cái Tôi

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies

December 2009
M T W T F S S
November 2009January 2010
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31