23 April 2010

OpenBSD - DHCPD

Allow computers to auto-configure network.

Just list the name of the INTERNAL interface:
echo 'INT-IF' >> /etc/dhcpd.interfaces

cat /etc/rc.conf.local
dhcpd_flags="-q"

Minimal DHCPd Configuration:

cat /etc/dhcpd.conf

shared-network LOCAL-NET {

option domain-name “foobar”;
option domain-name-servers 1.2.3.4, 1.2.3.5;

subnet 10.0.0.0 netmask 255.255.255.0 {
      option routers 10.0.0.1;
      range 10.0.0.30 10.0.0.250;
  }
}



Allowing DHCP through a Filter:

– For receiving DHCP requests (DHCP server)
pass in quick on $int_if proto udp from any port 67 to any port 68
keep state

– For making DHCP requests (DHCP client – dynamic IP)
pass out quick on $ext_if proto udp from 0.0.0.0 to 255.255.255.255
port 67 keep state




[*]


biOos

No comments: