Project

General

Profile

ISC DHCP » History » Version 10

Marcello de Sousa, 05/26/2011 11:45 AM

1 1 Ohad Levy
h1. ISC DHCP
2
3
ISC implementation is based on the omapi interface, which means:
4
* No need for root permissions on your DHCP server
5
* No need to restart (or "sync") your dhcp server after every modifications.
6
7
8
h3. Configuration
9
10
* dhcpd configuration file: 
11
ensure you have the following line in your dhcpd.conf file (somewhere in the top first lines):
12 3 Ohad Levy
<pre>omapi-port 7911;</pre>
13 4 Ohad Levy
* configure the settings file to point to your dhcpd.conf and dhcpd.leases files (make sure they are readable by the smart-proxy user)
14
* make sure the omshell command (/usr/bin/omshell) can be executed by the smart-proxy user.
15 5 Ohad Levy
16 10 Marcello de Sousa
h3. Securing the dhcp API
17
18
The dhcpd api server will listen to any host. You might need to add a omapi_key to provide basic security. 
19
20
Example generating a key (on CentOS):
21
<pre>
22
> yum install bind97
23
> dnssec-keygen -r /dev/urandom -a HMAC-MD5 -b 512 -n HOST omapi_key
24
> cat Komapi_key.+*.private |grep ^Key|cut -d ' ' -f2-
25
</pre>
26
27
1- Edit your "/etc/dhcpd.conf":
28
<pre>
29
omapi-port 7911;
30
key omapi_key {
31
algorithm HMAC-MD5;
32
secret "XXXXXXXXX"; #<-The output from the generated key above.
33
};
34
omapi-key omapi_key;
35
</pre>
36
37
2- Make sure you also add the omapi_key to your proxy's [[Smart-Proxy:Settingsyml#DHCP-section|settings.yml]]
38
39
3- Restart the dhcpd and foreman-proxy services
40
41
h3. Testing
42 5 Ohad Levy
43 8 Ohad Levy
If everything works, you could browse your dhcp server data if you goto http://proxy:8443/dhcp
44 6 Dis Connect
45 7 Ohad Levy
The next step is to set up appropriate Subnets in Foreman from the settings menu.
46 9 Ohad Levy
47
[[Sample dhcpd.conf]]