Project

General

Profile

ISC DHCP » History » Version 11

Florian Koch, 05/09/2012 02:54 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 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
Example generating a key (on CentOS):
23
<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
</pre>
28
29
1- Edit your "/etc/dhcpd.conf":
30
<pre>
31
omapi-port 7911;
32
key omapi_key {
33
algorithm HMAC-MD5;
34
secret "XXXXXXXXX"; #<-The output from the generated key above.
35
};
36
omapi-key omapi_key;
37
</pre>
38
39
2- Make sure you also add the omapi_key to your proxy's [[Smart-Proxy:Settingsyml#DHCP-section|settings.yml]]
40
41
3- Restart the dhcpd and foreman-proxy services
42
43
h3. Testing
44 5 Ohad Levy
45 8 Ohad Levy
If everything works, you could browse your dhcp server data if you goto http://proxy:8443/dhcp
46 6 Dis Connect
47 7 Ohad Levy
The next step is to set up appropriate Subnets in Foreman from the settings menu.
48 9 Ohad Levy
49
[[Sample dhcpd.conf]]