Enable UPNP Under FreeBSD
October 3rd, 2009
No comments
build and install from ports (/usr/ports/net/miniupnpd)
Add this to your /etc/rc.conf
miniupnpd_enable="YES"
Next add a few things to your /etc/pf.conf
rdr-anchor "miniupnpd" anchor "miniupnpd"
pass out on $int_if from any to 239.0.0.0/8 keep state pass in on $int_if from any to 239.0.0.0/8 keep state
Also change your NAT entry to add static-port
nat on $ext_if from $int_if:network to any -> ($ext_if) static-port
I tested from functionality from a couple OSX boxes with the following:
dns-sd -X udp 123 456 789
If upnp is working, it should return an address:
mifune:~ djh29$ dns-sd -X udp 123 456 789
Timestamp if External Address Protocol Internal Port External Port TTL 10:32:20.589 0 70.90.241.189 16 123 0 0 ^C mifune:~ djh29$
I fought with this thing for awhile before I realized that the multicast address rules were necessary under FreeBSD (per the INSTALL doc for miniupnpd).

