facelessfish / dhcpd-leasesd

A simple dashboard for the dhcpd.leases file of the OpenBSD dhcpd server.
BSD 2-Clause "Simplified" License
26 stars 3 forks source link

Cannot run with CGI #3

Open kasak87 opened 1 day ago

kasak87 commented 1 day ago

First, want to thank you for this highly usefull software! As mentioned in readme, I tried to run it with cgi, both with slowcgi, and apache with cgid module. Slowcgi just shows blank page, and apache shows

Internal Server Error

With this log: End of script output before headers: dhcpd-leasesd

The script has executable bit enabled. I can run it with /bin/sh dhcpd-leasesd. Maybe i can somehow debug it? Apache has LogLevel debug of course, but there is no usefull information except that one line.

facelessfish commented 1 day ago

Thanks for the kind words!

I had never tried using the script with httpd/slowcgi before but i gave it a shot now. A main issue with running the script as a cgi is the chroot, but the script too needs some updating which is planned for the next version.

I got the basic script running but not vendor lookup. Getting nc running in the chroot looks messy and I'm using that to download the oui data.

So unfortunately the cgi functionality is currently broken but it should work (less vendor lookup) in the next update. Until then i would recommend using the build in server or tcpserver.

kasak87 commented 23 hours ago

I'm looking forward to it. Chroot will not be in issue for me, because I run it on home router, and there is no point for hardening security with chroot.