pfSense UPnP service always stops working after a few minutes since last service restart
-
If I enable UPnP in pfSense 2.7.0, it seems to work fine. I can run the command
upnpc -r 1234 TCP
and I get the response:List of UPNP devices found on the network : desc: http://10.0.0.1:2189/rootDesc.xml st: urn:schemas-upnp-org:device:InternetGatewayDevice:1 Found valid IGD : http://10.0.0.1:2189/ctl/IPConn Local LAN ip address : 10.0.0.93 ExternalIPAddress = [redacted] InternalIP:Port = 10.0.0.93:1234 external [redacted]:1234 TCP is redirected to internal 10.0.0.93:1234 (duration=0)
I can run this command over and over again, with no issues. But after ~5 minutes or so, running the same command will give me:
No IGD UPnP Device found on the network !
I can restart the service and it will again work for several minutes before invariably not responding any more. I don't see anything in my firewall log except for "Default deny rule IPv6." Certainly nothing related to SSDP. My firewall rules are all default, consisting of just:
- WAN: Block private networks
- WAN: Block bogon networks
- LAN: Anti-Lockout Rule
- LAN: Default allow LAN to any rule
- LAN: Default allow LAN IPv6 to any rule
ps aux lists: /usr/local/sbin/miniupnpd -f /var/etc/miniupnpd.conf
If I restart the UPnP service and run tcpdump on pfSense, I get the following when running
upnpc
from my desktop:00:41:29.931828 IP 10.0.0.93.62316 > 239.255.255.250.ssdp: UDP, length 137 00:41:29.985376 IP router.home.arpa.ssdp > 10.0.0.93.62316: UDP, length 433
After waiting ~5 minutes I run the same command from my desktop and nothing shows up in tcpdump except for the occasional:
00:48:59.585197 IP router.home.arpa.42061 > 239.255.255.250.ssdp: UDP, length 473
The contents of
/var/etc/miniupnpd.conf
:ext_ifname=vtnet0 port=2189 listening_ip=vtnet1 secure_mode=yes presentation_url=https://10.0.0.1/ uuid=a03cd731-69f5-1480-71f4-91f53368e99 serial=A03CD731 model_number=2.7.0-RELEASE allow 1024-65535 10.0.0.40 1024-65535 allow 1024-65535 10.0.0.93 1024-65535 deny 0-65535 0.0.0.0/0 0-65535 enable_upnp=yes enable_natpmp=no
If I run miniupnpd on pfSense in debug mode I can also see it reacting to my upnpc commands, but after ~5 minutes the process is still running (with no error messages) but has absolutely no reaction any longer when I run
upnpc
on my desktop.