Freebsd – DHCPD on FreeNAS

dhcpdhcp-serverfreebsdtruenas

I've got a FreeNAS install I've been using for a while, and wanted to set it up to serve as a network boot server. I downloaded and installed the isc-dhcpd-server, configured the tftp+iscsi+etc servers (which do work), and then tried to run the DHCP server. However, it exited with Illegal Instruction, no matter what I did.

I believe this could be because I am missing some dependencies, however I cannot use pkg_add to correct this because it can never seem to connect to ftp.freebsd.org.
I've done:

setenv PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7-stable/Latest/

However, no matter what I do, pkg_add always does something like this:

 >pkg_add -rv isc-dhcp42-server                                    scheme:   [ftp]
 user:     []
 password: []
 host:     [ftp.freebsd.org]
 port:     [0]
 document: [/pub/FreeBSD/ports/i386/packages-7-stable/Latest/isc-dhcp42-server.tbz]
 ---> ftp.freebsd.org:21
 looking up ftp.freebsd.org
 connecting to ftp.freebsd.org:21

And just freezes on that. Is there any way to get isc-dhcp-server working on FreeNAS?

Best Answer

It doesn't seem as though you downloaded and configured the dhcpd package properly. That may be why the package manager is reaching out to the repository...

You may have a local (server) or network firewall rule preventing communication on the two ports needed for the FTP transfer. Port 21 is the control port and port 20 is the data port for active connections.

You could change the connection scheme to use http://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7-stable/Latest/ instead and try pkg_add again... Or you could check your firewall rules on the appliance.

Also, when you mentioned configuration, did you add any information to the dhcp server's configuration file?