Project

General

Profile

ISC DHCP » History » Version 12

David Schmitt, 05/05/2013 02:44 PM
added debian hint

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 11 Florian Koch
* make sure that /etc/dhcp and /etc/dhcp/dhcpd.conf has group foreman-proxy
16
17 5 Ohad Levy
18 10 Marcello de Sousa
h3. Securing the dhcp API
19
20
The dhcpd api server will listen to any host. You might need to add a omapi_key to provide basic security. 
21
22 12 David Schmitt
Example generating a key on CentOS:
23 10 Marcello de Sousa
<pre>
24
> yum install bind97
25
> dnssec-keygen -r /dev/urandom -a HMAC-MD5 -b 512 -n HOST omapi_key
26
> cat Komapi_key.+*.private |grep ^Key|cut -d ' ' -f2-
27 1 Ohad Levy
</pre>
28 12 David Schmitt
29
On Debian, the dnssec-keygen utility is found in the bind9utils package.
30 10 Marcello de Sousa
31
1- Edit your "/etc/dhcpd.conf":
32
<pre>
33
omapi-port 7911;
34
key omapi_key {
35
algorithm HMAC-MD5;
36
secret "XXXXXXXXX"; #<-The output from the generated key above.
37
};
38
omapi-key omapi_key;
39
</pre>
40
41
2- Make sure you also add the omapi_key to your proxy's [[Smart-Proxy:Settingsyml#DHCP-section|settings.yml]]
42
43
3- Restart the dhcpd and foreman-proxy services
44
45
h3. Testing
46 5 Ohad Levy
47 8 Ohad Levy
If everything works, you could browse your dhcp server data if you goto http://proxy:8443/dhcp
48 6 Dis Connect
49 7 Ohad Levy
The next step is to set up appropriate Subnets in Foreman from the settings menu.
50 9 Ohad Levy
51
[[Sample dhcpd.conf]]