I'm still having difficulty running it in jail, likely to be related to how my jail networking is set up (1).

But I can successfully set it up in the host. Steps:

  1. pkg install minidlna
  2. Configure minidlna.conf, network_interface=em0 (NOT eth0)
  3. echo 'minidlna_enable="YES"' >> /etc/rc.conf
  4. service minidlna start

Some facts:

  • uPNP protocol uses UDP 1900
  • miniDLNA uses TCP 8200 for status web page
  • miniDLNA on FreeBSD:
    • service is minidlna
    • process is minidlnad
    • configuration is /usr/local/etc/minidlna.conf
    • log file (default) is /var/log/minidlna.log
    • db directory (default) is /var/db/minidlna/
  • minidlnad -R to rescan
  • VLC can be used as DLNA client

In a jail, I tried config pf with:

rdr proto tcp from any to any port 8200 -> <jail_IP>
rdr proto udp from any to any port 1900 -> <jail_IP>

I can access http://<jail_IP>:8200 from LAN. I can also talk to udp://<jail_IP>:1900 from LAN using ncat. But VLC does not recognize the DLNA server.