Installing ISC DHCP for ABillS

Here is an example of the installation of the ISC DHCP server for ABillS in Ubuntu Server.

Switch to the root user:

sudo -i

Install package:

apt-get install isc-dhcp-server
ln -s /usr/abills/Abills/modules/Dhcphosts/leases2db.pl /usr/abills/libexec/leases2db.pl

Run:

/usr/abills/libexec/leases2db.pl -d LEASES=/var/lib/dhcp/dhcpd.leases

Change owner of a file:

chown www-data /etc/dhcp/dhcpd.conf

Open the config.pl in the Editor:

nano /usr/abills/libexec/config.pl

Add options:

$conf{DHCPHOSTS_CONFIG}='/etc/dhcp/dhcpd.conf';
$conf{DHCPHOSTS_LEASES}='/var/lib/dhcp/dhcpd.leases';
$conf{DHCPHOSTS_RECONFIGURE}='/usr/bin/sudo /etc/init.d/isc-dhcp-server restart';

Open in the Editor:

nano /etc/sudoers

Add the string making the ability to run a service system:

www-data   ALL = NOPASSWD: /etc/init.d/isc-dhcp-server

Go to the Abills Web interface, open the menu "settings"-"IP (DHCP)"-"Network IP (DHCP) Network", add the network if needed, then "Show, reconfigure the dhcp" and "Reconfigure".

See if the isc-dhcp-server command:

/etc/init.d/isc-dhcp-server status

Logs are written to the file/var/log/syslog

You can also configure the export of DHCP history to see it in the “Report” – “DHCP History” menu.
To do this, make a link:

ln -s /usr/abills/Abills/modules/Dhcphosts/dhcp_log2db.pl /usr/abills/libexec/dhcp_log2db.pl

Separating DHCP logs into a separate file as I wrote in the article below and adding to the Startup script with the command:

tail -F /var/log/dhcpd.log | /usr/abills/libexec/dhcp_log2db.pl

See also my articles:
Installing and configuring a dhcp server, isc-in Ubuntu
Packet capturing with tcpdump