3

I have a IP camera on my network that is truly plug n play. As soon as I plugged the Ethernet cable in, it was accessible from 'the outside', without me having to touch my router's configuration. So I know my router supports UPnP. I can also NMAP it an see that the UPnP server is listening on 5431.

I'm trying to enable a temporary FTP server (changed to port 29 in this case) that I want a friend to be able to access. I installed miniupnp and ran the following command.

$ upnpc -l
upnpc : miniupnpc library test client. (c) 2005-2013 Thomas Bernard
Go to http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
for more information.
No IGD UPnP Device found on the network !

miniupnp is apparently having trouble finding my router, or thinks it's not enabling UPnP.

How can I troubleshoot this?

EDIT: I just managed to get a telnet session into my IP camera. Coincidently it is also running miniupnp, I ran the binary and it returned:

# ./upnpc-static -l    
upnpc : miniupnpc library test client. (c) 2006-2010 Thomas Bernard
Go to http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
for more information.
List of UPNP devices found on the network :
 desc: http://192.168.0.1:5431/dyndev/uuid:c03e0f29-4fec-ec4f-290f-3ec03e29ec0000
 st: urn:schemas-upnp-org:device:InternetGatewayDevice:1

Found valid IGD : http://192.168.0.1:5431/uuid:c03e0f29-4fec-ec4f-290f-3ec03e29ec0002/WANPPPConnection:1
Local LAN ip address : 192.168.0.30
Connection Type : IP_Routed
Status : Connected, uptime=127693s, LastConnectionError : 
  Time started : Wed Feb  4 01:06:15 2015
MaxBitRateDown : 20819000 bps   MaxBitRateUp 1209000 bps
ExternalIPAddress = 90.220.126.102
 0 TCP    80->192.168.0.30:80    'ipcam-h264' ''
 1 UDP 41441->192.168.0.4:41441 'Skype UDP at 192.168.0.4:41441 (2956)' ''
 2 TCP 41441->192.168.0.4:41441 'Skype TCP at 192.168.0.4:41441 (2956)' ''
GetGenericPortMappingEntry() returned 713 (SpecifiedArrayIndexInvalid)

So the same program on my IP camera is finding the IGD, wheras my laptop isn't.

Juicy
  • 3,685
  • 11
  • 31
  • 44
  • What OS is this? Do you have firewall rules? – bot47 Feb 05 '15 at 17:28
  • @MaxRied My laptop is Fedora21 and the little embedded device is running uClinux/Busybox. You are probably right it may have something to do with Firewall rules but I've never touched iptables before (I have the default config). I'll look around to see how I can enable upnp, if you have any suggestions I'd love to hear them! – Juicy Feb 05 '15 at 18:14
  • you may have several network interface on your laptop. make sure upnpc picks the right one (use the -m option) –  Feb 06 '15 at 14:30
  • Was iptables for me – Kevin Parker Dec 13 '15 at 20:00
  • any solution to this? – Shravya Boggarapu Jan 03 '22 at 13:29

1 Answers1

1

If you have a firewall enabled (like iptables or ufw) you have to allow incoming UDP packets from the router

For ufw it would be something like this

sudo ufw allow from 192.168.1.1 to any proto udp
Madacol
  • 131
  • 3