我的网络上有一个真正的即插即用的IP摄像头。一旦我插入以太网电缆,它就可以从“外部”访问,而无需触摸路由器的配置。所以我知道我的路由器支持UPnP。我还可以看到UPnP服务器正在监听5431。
我正在尝试启用临时FTP服务器(在本例中更改为端口29 ),希望朋友能够访问该服务器。我安装了miniupnp并运行了以下命令。
$ 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显然很难找到我的路由器,或者认为它没有启用UPnP。
我如何解决这个问题?
编辑:我刚刚在我的IP摄像头中安装了一个telnet会话。巧合的是,它也在运行miniupnp,我运行了二进制文件,它返回了:
# ./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)所以我的IP摄像头上的同一个程序就是找到IGD,而我的笔记本电脑却不在。
发布于 2022-11-06 00:00:04
如果启用了防火墙(如iptables或ufw),则必须允许来自路由器的UDP数据包进入
对于ufw来说是这样的
sudo ufw allow from 192.168.1.1 to any proto udphttps://unix.stackexchange.com/questions/183036
复制相似问题