Lede: miniupnpd最新版 NAT-PMP 和 UPnP 都无法使用

Created on 7 Jul 2020  ·  86Comments  ·  Source: coolsnowwolf/lede

反馈bug/问题模板,提建议请删除

1.关于你要提交的问题

Q:是否搜索了issue (使用 "x" 选择)

  • [x] 没有类似的issue

2. 详细叙述

使用最新的源码编译 miniupnpd NAT-PMP 和 UPnP 都无法使用
比特彗星提示 UPnP NAT端口映射: 失败 [MiniUPnP (http://miniupnp.free.fr/)]

原来的源码编译则没问题,是不是由于miniupnpd的版本更新导致的?

(1) 具体问题

A:

(2) 路由器型号和固件版本

A:新路由3

(3) 详细日志

A:
Tue Jul 7 11:00:11 2020 daemon.err miniupnpd[3466]: Failed to add NAT-PMP 47338 tcp->192.168.2.100:47338 'NAT-PMP 47338 tcp'
Tue Jul 7 11:00:11 2020 daemon.err miniupnpd[3466]: Failed to add NAT-PMP 47338 udp->192.168.2.100:47338 'NAT-PMP 47338 udp'
Tue Jul 7 11:00:11 2020 daemon.err miniupnpd[3466]: upnp_event_recv: recv(): Connection reset by peer
Tue Jul 7 11:00:11 2020 daemon.err miniupnpd[3466]: upnpevents_processfds: 0x4287f0, remove subscriber uuid:82a1f7c6-22c0-455b-bdec-29dda616a63d after an ERROR cb: http://192.168.2.100:2869/upnp/eventing/rnocpffhvb
Tue Jul 7 11:00:11 2020 daemon.err miniupnpd[3466]: upnp_event_recv: recv(): Connection reset by peer
Tue Jul 7 11:00:11 2020 daemon.err miniupnpd[3466]: upnpevents_processfds: 0x4287f0, remove subscriber uuid:5f85017c-a892-45af-ac00-69f62d4a61c8 after an ERROR cb: http://192.168.2.100:2869/upnp/eventing/famoiqmwaa

这个是bittorrent进行nat-pmp映射操作时的log,比特彗星和其他使用upnp映射的软件没有日志出来...

编辑:编译老的20170421版本,完美

再次编辑:问题已修复 https://github.com/coolsnowwolf/packages/commit/a8fcc42cf39fd8d1e4bf8d61fbb7510937f28df8

Most helpful comment

有一说一,我之前维护的那个 miniupnpd 版本确实更适合国内的应用。。。。

All 86 comments

如图设置

image

同样问题,卸载了mwan3还是不行,miniupnpd的版本太新了

有一说一,我之前维护的那个 miniupnpd 版本确实更适合国内的应用。。。。

image

测试可用

image

image

新版本已做过调整,迅雷,BitComet 和 QBT 都已通过测试正常

u1s1,国内环境和国外不一样的

我测试过新版5.4x86,哪怕是打开v1,迅雷部分好用的版本包括绿色版,是无法成功打开upnp,bit彗星,微信这些正常。5.4内核上,ssr+还会出现运行不稳定,频繁切换节点的情况,并不是节点故障。只需要把内核切换回4.19和2017版本,恢复正常。所以新内核暂时观望。

image

image

新版本已做过调整,迅雷,BitComet 和 QBT 都已通过测试正常

这是哪个版本号的upnp?

image
image
新版本已做过调整,迅雷,BitComet 和 QBT 都已通过测试正常

这是哪个版本号的upnp?

目前最新2.1稳定版。2020年。

昨天试了下新版5.4.50,只接lan口的情况下客户端开着迅雷upnp正常,设置成旁路由以后(主路由dhcp)还是不行,同环境下切换回6月的老版本是可以的。还有个奇怪的问题,6月10号以后的版本不知道为什么speedtest会连不上,connection failed,之前的版本都没问题,日志也没看出有啥问题。另外还想问下,actions里面workflow的云编译版本是不是没饮料了。。。要怎么才可以单独安装哈,小白一个,望有大神明示,谢啦~

实测最新版依旧不行

我还遇到过很奇怪的现象,同样作为主路由,IP地址设为192.168.123.3的话有些软件的UPNP就不工作,比如群晖。但是把路由器IP地址改成192.168.123.1的话UPNP就正常了

只要开了IPV6,必然无法正常工作,关了就可以了。
以前老版本2017的即使开了ipv6,还是可以正常运行的。

当前版本,启动的时候会判断有没有ipv6,有的话优先使用ipv6,没有ipv6就会关掉ipv6,现在通过看系统日志可以分析出来。

目前广大移动用户没有公网ipv4,只公网ipv6,所以移动用户想用DDNS,也只能用ipv6的,主流BT客户端现在也支持IPV6了,虽然资源还是比较少的,但总比没有强。所以对于移动用户,IPV6是刚需。

移动宽带数量非常庞大,移动免费送,不要白不要。

最新版的upnp是可以直接关闭对IPV6的支持,只解析IPV4,像2017版一样。

官方的changelog
https://miniupnp.tuxfamily.org/files/changelog.php?file=miniupnpd-2.2.0-RC1.tar.gz

https://miniupnp.tuxfamily.org/files/changelog.php?file=miniupnpd-2.1.20200510.tar.gz

2020/04/09:
Option to disable IPv6 at runtime : -4 / ipv6_disable=yes

找到解决办法了:

https://github.com/coolsnowwolf/packages/blob/master/net/miniupnpd/files/miniupnpd.init

image

IPV6下也正常了:

image

确实是用不了了
1

我的也用不了。
日志:
Sun Jul 12 18:31:53 2020 daemon.notice miniupnpd[15716]: HTTP listening on port 5000
Sun Jul 12 18:31:53 2020 daemon.notice miniupnpd[15716]: Listening for NAT-PMP/PCP traffic on port 5351
Sun Jul 12 18:32:38 2020 authpriv.info dropbear[16214]: Child connection from 192.168.1.102:65344
Sun Jul 12 18:32:38 2020 authpriv.notice dropbear[16214]: Password auth succeeded for 'root' from 192.168.1.102:65344
Sun Jul 12 18:32:45 2020 daemon.err miniupnpd[15716]: Failed to add NAT-PMP 20492 tcp->192.168.1.101:32400 'NAT-PMP 20492 tcp'

设置如图:
image

版本号:
image

7.11拉取的源码也用不了,版本是X64

Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=474, dest=[ff0e::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=474, dest=[ff0e::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=490, dest=[ff0e::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=486, dest=[ff0e::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=474, dest=[ff0e::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=472, dest=[ff0e::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=419, dest=[ff0e::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=458, dest=[ff0e::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=419, dest=[ff0e::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=478, dest=[ff0e::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=419, dest=[ff0e::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=482, dest=[ff0e::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=410, dest=[ff0e::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=474, dest=[ff05::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=474, dest=[ff05::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=490, dest=[ff05::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=486, dest=[ff05::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=474, dest=[ff05::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=472, dest=[ff05::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=419, dest=[ff05::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=458, dest=[ff05::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=419, dest=[ff05::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=478, dest=[ff05::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=419, dest=[ff05::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=482, dest=[ff05::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=410, dest=[ff05::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=474, dest=[ff02::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=474, dest=[ff02::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=490, dest=[ff02::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=486, dest=[ff02::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=474, dest=[ff02::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=472, dest=[ff02::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=419, dest=[ff02::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=458, dest=[ff02::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=419, dest=[ff02::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=478, dest=[ff02::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=419, dest=[ff02::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=482, dest=[ff02::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=410, dest=[ff02::c]:1900): sendto: Permission denied
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=7, len=472, dest=239.255.255.250:1900): sendto: No such device
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=7, len=472, dest=239.255.255.250:1900): sendto: No such device
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=7, len=488, dest=239.255.255.250:1900): sendto: No such device
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=7, len=484, dest=239.255.255.250:1900): sendto: No such device
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=7, len=472, dest=239.255.255.250:1900): sendto: No such device
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=7, len=470, dest=239.255.255.250:1900): sendto: No such device
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=7, len=417, dest=239.255.255.250:1900): sendto: No such device
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=7, len=456, dest=239.255.255.250:1900): sendto: No such device
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=7, len=417, dest=239.255.255.250:1900): sendto: No such device
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=7, len=476, dest=239.255.255.250:1900): sendto: No such device
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=7, len=417, dest=239.255.255.250:1900): sendto: No such device
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=7, len=480, dest=239.255.255.250:1900): sendto: No such device
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=7, len=408, dest=239.255.255.250:1900): sendto: No such device
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto failed to send 52 packets

只要开了IPV6,必然无法正常工作,关了就可以了。
以前老版本2017的即使开了ipv6,还是可以正常运行的。

当前版本,启动的时候会判断有没有ipv6,有的话优先使用ipv6,没有ipv6就会关掉ipv6,现在通过看系统日志可以分析出来。

目前广大移动用户没有公网ipv4,只公网ipv6,所以移动用户想用DDNS,也只能用ipv6的,主流BT客户端现在也支持IPV6了,虽然资源还是比较少的,但总比没有强。所以对于移动用户,IPV6是刚需。

移动宽带数量非常庞大,移动免费送,不要白不要。

最新版的upnp是可以直接关闭对IPV6的支持,只解析IPV4,像2017版一样。

官方的changelog
https://miniupnp.tuxfamily.org/files/changelog.php?file=miniupnpd-2.2.0-RC1.tar.gz

https://miniupnp.tuxfamily.org/files/changelog.php?file=miniupnpd-2.1.20200510.tar.gz

2020/04/09:
Option to disable IPv6 at runtime : -4 / ipv6_disable=yes

找到解决办法了:

https://github.com/coolsnowwolf/packages/blob/master/net/miniupnpd/files/miniupnpd.init

image

IPV6下也正常了:

image

这个能通过SSH改么,能否指导一下,回去试试,谢啦

经过查找miniupnpd的源码,我找到了一个地方
如果 miniupnpd 发现外网的ip是内部地址(符合以下地址类型)
image
就会禁止添加转发
image
但是根据提示如果开启 ext_perform_stun=yes ,还是可以打开转发功能,经过翻看启动文件啥的
在 /etc/config/upnpd 添加这两项,即可开启转发
image
option use_stun '1'
option stun_host 'stun.ideasip.com'

然后测试就正常了
image
image
如果有遇到此问题的,可以尝试一下。

经过查找miniupnpd的源码,我找到了一个地方
如果 miniupnpd 发现外网的ip是内部地址(符合以下地址类型)
image
就会禁止添加转发
image
但是根据提示如果开启 ext_perform_stun=yes ,还是可以打开转发功能,经过翻看启动文件啥的
在 /etc/config/upnpd 添加这两项,即可开启转发
image
option use_stun '1' option stun_host 'stun.ideasip.com'

然后测试就正常了
image
image
如果有遇到此问题的,可以尝试一下。

改完后,要重启upnp服务吗

经过查找miniupnpd的源码,我找到了一个地方
如果 miniupnpd 发现外网的ip是内部地址(符合以下地址类型)
image
就会禁止添加转发
image
但是根据提示如果开启 ext_perform_stun=yes ,还是可以打开转发功能,经过翻看启动文件啥的
在 /etc/config/upnpd 添加这两项,即可开启转发
image
option use_stun '1' option stun_host 'stun.ideasip.com'
然后测试就正常了
image
image
如果有遇到此问题的,可以尝试一下。

改完后,要重启upnp服务吗,,重启upnp后还是没用。

经过查找miniupnpd的源码,我找到了一个地方
如果 miniupnpd 发现外网的ip是内部地址(符合以下地址类型)
image
就会禁止添加转发
image
但是根据提示如果开启 ext_perform_stun=yes ,还是可以打开转发功能,经过翻看启动文件啥的
在 /etc/config/upnpd 添加这两项,即可开启转发
image
option use_stun '1' option stun_host 'stun.ideasip.com'
然后测试就正常了
image
image
如果有遇到此问题的,可以尝试一下。

改完后,要重启upnp服务吗,,重启upnp后还是没用。

发一下系统日志,我可以具体看一下是什么问题(upnp勾选 启用额外的日志)

经过查找miniupnpd的源码,我找到了一个地方
如果 miniupnpd 发现外网的ip是内部地址(符合以下地址类型)
image
就会禁止添加转发
image
但是根据提示如果开启 ext_perform_stun=yes ,还是可以打开转发功能,经过翻看启动文件啥的
在 /etc/config/upnpd 添加这两项,即可开启转发
image
option use_stun '1' option stun_host 'stun.ideasip.com'
然后测试就正常了
image
image
如果有遇到此问题的,可以尝试一下。

改完后,要重启upnp服务吗,,重启upnp后还是没用。

发一下系统日志,我可以具体看一下是什么问题(upnp勾选 启用额外的日志)

按你的方法之前:
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: version 2.1.20200510 starting NAT-PMP/PCP UPnP-IGD ext if br-lan BOOTID=1594633439
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: specific IPv6 ext if
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: Reserved / private IP address 192.168.1.1 on ext interface br-lan: Port forwarding is impossible
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: You are probably behind NAT, enable option ext_perform_stun=yes to detect public IP address
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: Or use ext_ip= / -o option to declare public IP address
Mon Jul 13 17:43:59 2020 daemon.notice miniupnpd[13520]: HTTP listening on port 5000
Mon Jul 13 17:43:59 2020 daemon.notice miniupnpd[13520]: Listening for NAT-PMP/PCP traffic on port 5351
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: HTTP REQUEST from 192.168.1.25:45399 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: Host: 192.168.1.1:5000
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: HTTP REQUEST from 192.168.1.25:45400 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: Host: 192.168.1.1:5000
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: HTTP REQUEST from 192.168.1.25:45401 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: Host: 192.168.1.1:5000
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: HTTP REQUEST from 192.168.1.25:45402 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: Host: 192.168.1.1:5000
Mon Jul 13 17:44:00 2020 daemon.debug miniupnpd[13520]: level=0 type=8
Mon Jul 13 17:44:00 2020 daemon.debug miniupnpd[13520]: ifindex = 6 192.168.1.1
Mon Jul 13 17:44:00 2020 daemon.debug miniupnpd[13520]: level=0 type=8

按你的方法之后:
Mon Jul 13 17:46:50 2020 daemon.info miniupnpd[15317]: version 2.1.20200510 starting NAT-PMP/PCP UPnP-IGD ext if br-lan BOOTID=1594633610
Mon Jul 13 17:46:50 2020 daemon.info miniupnpd[15317]: specific IPv6 ext if
Mon Jul 13 17:46:50 2020 daemon.info miniupnpd[15317]: STUN: Performing with host=stun.ideasip.com and port=0 ...
Mon Jul 13 17:46:50 2020 daemon.debug miniupnpd[15317]: resolve_stun_host: stun.ideasip.com:3478 => 77.72.169.213:3478
Mon Jul 13 17:46:50 2020 daemon.info miniupnpd[15317]: perform_stun: local ports 50018 35361 33743 58709
Mon Jul 13 17:46:50 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Mon Jul 13 17:46:50 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: received responses: 1
Mon Jul 13 17:46:50 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Mon Jul 13 17:46:53 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: select(): no more responses
Mon Jul 13 17:46:53 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Mon Jul 13 17:46:56 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: select(): no more responses
Mon Jul 13 17:46:56 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Mon Jul 13 17:46:59 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: select(): no more responses
Mon Jul 13 17:46:59 2020 daemon.debug miniupnpd[15317]: parse_stun_response: Type 0x0101, Length 36, Magic Cookie 2112a442
Mon Jul 13 17:46:59 2020 daemon.debug miniupnpd[15317]: parse_stun_response: MAPPED-ADDRESS 222.79.50.204:50018
Mon Jul 13 17:46:59 2020 daemon.debug miniupnpd[15317]: parse_stun_response: SOURCE-ADDRESS 77.72.169.213:3478
Mon Jul 13 17:46:59 2020 daemon.debug miniupnpd[15317]: parse_stun_response: CHANGED-ADDRESS 77.72.169.212:3479
Mon Jul 13 17:46:59 2020 daemon.notice miniupnpd[15317]: perform_stun: 1 response out of 4 received
Mon Jul 13 17:46:59 2020 daemon.warn miniupnpd[15317]: STUN: ext interface br-lan with IP address 192.168.1.1 is now behind restrictive NAT with public IP address 222.79.50.204: Port forwarding is now impossible
Mon Jul 13 17:46:59 2020 daemon.notice miniupnpd[15317]: HTTP listening on port 5000
Mon Jul 13 17:46:59 2020 daemon.notice miniupnpd[15317]: Listening for NAT-PMP/PCP traffic on port 5351
Mon Jul 13 17:47:00 2020 daemon.info miniupnpd[15317]: HTTP REQUEST from 192.168.1.25:45447 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: Host: 192.168.1.1:5000
Mon Jul 13 17:47:00 2020 daemon.info miniupnpd[15317]: HTTP REQUEST from 192.168.1.25:45448 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: Host: 192.168.1.1:5000
Mon Jul 13 17:47:00 2020 daemon.info miniupnpd[15317]: HTTP REQUEST from 192.168.1.25:45450 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: Host: 192.168.1.1:5000
Mon Jul 13 17:47:00 2020 daemon.info miniupnpd[15317]: HTTP REQUEST from 192.168.1.25:45449 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: Host: 192.168.1.1:5000
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: level=0 type=8
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: ifindex = 6 192.168.1.1
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: level=0 type=8
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: ifindex = 6 192.168.1.1
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: level=0 type=8

经过查找miniupnpd的源码,我找到了一个地方
如果 miniupnpd 发现外网的ip是内部地址(符合以下地址类型)
image
就会禁止添加转发
image
但是根据提示如果开启 ext_perform_stun=yes ,还是可以打开转发功能,经过翻看启动文件啥的
在 /etc/config/upnpd 添加这两项,即可开启转发
image
option use_stun '1' option stun_host 'stun.ideasip.com'
然后测试就正常了
image
image
如果有遇到此问题的,可以尝试一下。

改完后,要重启upnp服务吗,,重启upnp后还是没用。

发一下系统日志,我可以具体看一下是什么问题(upnp勾选 启用额外的日志)

按你的方法之前:
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: version 2.1.20200510 starting NAT-PMP/PCP UPnP-IGD ext if br-lan BOOTID=1594633439
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: specific IPv6 ext if
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: Reserved / private IP address 192.168.1.1 on ext interface br-lan: Port forwarding is impossible
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: You are probably behind NAT, enable option ext_perform_stun=yes to detect public IP address
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: Or use ext_ip= / -o option to declare public IP address
Mon Jul 13 17:43:59 2020 daemon.notice miniupnpd[13520]: HTTP listening on port 5000
Mon Jul 13 17:43:59 2020 daemon.notice miniupnpd[13520]: Listening for NAT-PMP/PCP traffic on port 5351
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: HTTP REQUEST from 192.168.1.25:45399 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: Host: 192.168.1.1:5000
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: HTTP REQUEST from 192.168.1.25:45400 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: Host: 192.168.1.1:5000
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: HTTP REQUEST from 192.168.1.25:45401 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: Host: 192.168.1.1:5000
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: HTTP REQUEST from 192.168.1.25:45402 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: Host: 192.168.1.1:5000
Mon Jul 13 17:44:00 2020 daemon.debug miniupnpd[13520]: level=0 type=8
Mon Jul 13 17:44:00 2020 daemon.debug miniupnpd[13520]: ifindex = 6 192.168.1.1
Mon Jul 13 17:44:00 2020 daemon.debug miniupnpd[13520]: level=0 type=8

按你的方法之后:
Mon Jul 13 17:46:50 2020 daemon.info miniupnpd[15317]: version 2.1.20200510 starting NAT-PMP/PCP UPnP-IGD ext if br-lan BOOTID=1594633610
Mon Jul 13 17:46:50 2020 daemon.info miniupnpd[15317]: specific IPv6 ext if
Mon Jul 13 17:46:50 2020 daemon.info miniupnpd[15317]: STUN: Performing with host=stun.ideasip.com and port=0 ...
Mon Jul 13 17:46:50 2020 daemon.debug miniupnpd[15317]: resolve_stun_host: stun.ideasip.com:3478 => 77.72.169.213:3478
Mon Jul 13 17:46:50 2020 daemon.info miniupnpd[15317]: perform_stun: local ports 50018 35361 33743 58709
Mon Jul 13 17:46:50 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Mon Jul 13 17:46:50 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: received responses: 1
Mon Jul 13 17:46:50 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Mon Jul 13 17:46:53 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: select(): no more responses
Mon Jul 13 17:46:53 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Mon Jul 13 17:46:56 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: select(): no more responses
Mon Jul 13 17:46:56 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Mon Jul 13 17:46:59 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: select(): no more responses
Mon Jul 13 17:46:59 2020 daemon.debug miniupnpd[15317]: parse_stun_response: Type 0x0101, Length 36, Magic Cookie 2112a442
Mon Jul 13 17:46:59 2020 daemon.debug miniupnpd[15317]: parse_stun_response: MAPPED-ADDRESS 222.79.50.204:50018
Mon Jul 13 17:46:59 2020 daemon.debug miniupnpd[15317]: parse_stun_response: SOURCE-ADDRESS 77.72.169.213:3478
Mon Jul 13 17:46:59 2020 daemon.debug miniupnpd[15317]: parse_stun_response: CHANGED-ADDRESS 77.72.169.212:3479
Mon Jul 13 17:46:59 2020 daemon.notice miniupnpd[15317]: perform_stun: 1 response out of 4 received
Mon Jul 13 17:46:59 2020 daemon.warn miniupnpd[15317]: STUN: ext interface br-lan with IP address 192.168.1.1 is now behind restrictive NAT with public IP address 222.79.50.204: Port forwarding is now impossible
Mon Jul 13 17:46:59 2020 daemon.notice miniupnpd[15317]: HTTP listening on port 5000
Mon Jul 13 17:46:59 2020 daemon.notice miniupnpd[15317]: Listening for NAT-PMP/PCP traffic on port 5351
Mon Jul 13 17:47:00 2020 daemon.info miniupnpd[15317]: HTTP REQUEST from 192.168.1.25:45447 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: Host: 192.168.1.1:5000
Mon Jul 13 17:47:00 2020 daemon.info miniupnpd[15317]: HTTP REQUEST from 192.168.1.25:45448 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: Host: 192.168.1.1:5000
Mon Jul 13 17:47:00 2020 daemon.info miniupnpd[15317]: HTTP REQUEST from 192.168.1.25:45450 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: Host: 192.168.1.1:5000
Mon Jul 13 17:47:00 2020 daemon.info miniupnpd[15317]: HTTP REQUEST from 192.168.1.25:45449 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: Host: 192.168.1.1:5000
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: level=0 type=8
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: ifindex = 6 192.168.1.1
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: level=0 type=8
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: ifindex = 6 192.168.1.1
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: level=0 type=8

image
按照日志,依旧不可用,我明天再翻一下源码,找找解决方法。

按你的方法之前:
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: version 2.1.20200510 starting NAT-PMP/PCP UPnP-IGD ext if br-lan BOOTID=1594633439
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: specific IPv6 ext if
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: Reserved / private IP address 192.168.1.1 on ext interface br-lan: Port forwarding is impossible
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: You are probably behind NAT, enable option ext_perform_stun=yes to detect public IP address
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: Or use ext_ip= / -o option to declare public IP address
Mon Jul 13 17:43:59 2020 daemon.notice miniupnpd[13520]: HTTP listening on port 5000
Mon Jul 13 17:43:59 2020 daemon.notice miniupnpd[13520]: Listening for NAT-PMP/PCP traffic on port 5351
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: HTTP REQUEST from 192.168.1.25:45399 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: Host: 192.168.1.1:5000
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: HTTP REQUEST from 192.168.1.25:45400 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: Host: 192.168.1.1:5000
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: HTTP REQUEST from 192.168.1.25:45401 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: Host: 192.168.1.1:5000
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: HTTP REQUEST from 192.168.1.25:45402 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: Host: 192.168.1.1:5000
Mon Jul 13 17:44:00 2020 daemon.debug miniupnpd[13520]: level=0 type=8
Mon Jul 13 17:44:00 2020 daemon.debug miniupnpd[13520]: ifindex = 6 192.168.1.1
Mon Jul 13 17:44:00 2020 daemon.debug miniupnpd[13520]: level=0 type=8

按你的方法之后:
Mon Jul 13 17:46:50 2020 daemon.info miniupnpd[15317]: version 2.1.20200510 starting NAT-PMP/PCP UPnP-IGD ext if br-lan BOOTID=1594633610
Mon Jul 13 17:46:50 2020 daemon.info miniupnpd[15317]: specific IPv6 ext if
Mon Jul 13 17:46:50 2020 daemon.info miniupnpd[15317]: STUN: Performing with host=stun.ideasip.com and port=0 ...
Mon Jul 13 17:46:50 2020 daemon.debug miniupnpd[15317]: resolve_stun_host: stun.ideasip.com:3478 => 77.72.169.213:3478
Mon Jul 13 17:46:50 2020 daemon.info miniupnpd[15317]: perform_stun: local ports 50018 35361 33743 58709
Mon Jul 13 17:46:50 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Mon Jul 13 17:46:50 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: received responses: 1
Mon Jul 13 17:46:50 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Mon Jul 13 17:46:53 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: select(): no more responses
Mon Jul 13 17:46:53 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Mon Jul 13 17:46:56 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: select(): no more responses
Mon Jul 13 17:46:56 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Mon Jul 13 17:46:59 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: select(): no more responses
Mon Jul 13 17:46:59 2020 daemon.debug miniupnpd[15317]: parse_stun_response: Type 0x0101, Length 36, Magic Cookie 2112a442
Mon Jul 13 17:46:59 2020 daemon.debug miniupnpd[15317]: parse_stun_response: MAPPED-ADDRESS 222.79.50.204:50018
Mon Jul 13 17:46:59 2020 daemon.debug miniupnpd[15317]: parse_stun_response: SOURCE-ADDRESS 77.72.169.213:3478
Mon Jul 13 17:46:59 2020 daemon.debug miniupnpd[15317]: parse_stun_response: CHANGED-ADDRESS 77.72.169.212:3479
Mon Jul 13 17:46:59 2020 daemon.notice miniupnpd[15317]: perform_stun: 1 response out of 4 received
Mon Jul 13 17:46:59 2020 daemon.warn miniupnpd[15317]: STUN: ext interface br-lan with IP address 192.168.1.1 is now behind restrictive NAT with public IP address 222.79.50.204: Port forwarding is now impossible
Mon Jul 13 17:46:59 2020 daemon.notice miniupnpd[15317]: HTTP listening on port 5000
Mon Jul 13 17:46:59 2020 daemon.notice miniupnpd[15317]: Listening for NAT-PMP/PCP traffic on port 5351
Mon Jul 13 17:47:00 2020 daemon.info miniupnpd[15317]: HTTP REQUEST from 192.168.1.25:45447 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: Host: 192.168.1.1:5000
Mon Jul 13 17:47:00 2020 daemon.info miniupnpd[15317]: HTTP REQUEST from 192.168.1.25:45448 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: Host: 192.168.1.1:5000
Mon Jul 13 17:47:00 2020 daemon.info miniupnpd[15317]: HTTP REQUEST from 192.168.1.25:45450 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: Host: 192.168.1.1:5000
Mon Jul 13 17:47:00 2020 daemon.info miniupnpd[15317]: HTTP REQUEST from 192.168.1.25:45449 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: Host: 192.168.1.1:5000
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: level=0 type=8
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: ifindex = 6 192.168.1.1
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: level=0 type=8
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: ifindex = 6 192.168.1.1
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: level=0 type=8

查了一下,你的情况是,它对stun服务器发送了4个请求,只成功接收了一个,判定你的是限制型NAT,就不给你开放功能了。
这种情况除了改源码 miniupnpd.c 的第 2152 行,disable_port_forwarding = 1 改为 0,别无他法(而且只改一个地方好像也不行)。
而且限制型NAT开了 upnp 也没有什么效果。

我的原本就有公网IP,只不过是光猫拨号,添加这两个选项就有效。1:1非限制型NAT。

按你的方法之前:
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: version 2.1.20200510 starting NAT-PMP/PCP UPnP-IGD ext if br-lan BOOTID=1594633439
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: specific IPv6 ext if
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: Reserved / private IP address 192.168.1.1 on ext interface br-lan: Port forwarding is impossible
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: You are probably behind NAT, enable option ext_perform_stun=yes to detect public IP address
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: Or use ext_ip= / -o option to declare public IP address
Mon Jul 13 17:43:59 2020 daemon.notice miniupnpd[13520]: HTTP listening on port 5000
Mon Jul 13 17:43:59 2020 daemon.notice miniupnpd[13520]: Listening for NAT-PMP/PCP traffic on port 5351
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: HTTP REQUEST from 192.168.1.25:45399 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: Host: 192.168.1.1:5000
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: HTTP REQUEST from 192.168.1.25:45400 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: Host: 192.168.1.1:5000
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: HTTP REQUEST from 192.168.1.25:45401 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: Host: 192.168.1.1:5000
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: HTTP REQUEST from 192.168.1.25:45402 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: Host: 192.168.1.1:5000
Mon Jul 13 17:44:00 2020 daemon.debug miniupnpd[13520]: level=0 type=8
Mon Jul 13 17:44:00 2020 daemon.debug miniupnpd[13520]: ifindex = 6 192.168.1.1
Mon Jul 13 17:44:00 2020 daemon.debug miniupnpd[13520]: level=0 type=8

按你的方法之后:
Mon Jul 13 17:46:50 2020 daemon.info miniupnpd[15317]: version 2.1.20200510 starting NAT-PMP/PCP UPnP-IGD ext if br-lan BOOTID=1594633610
Mon Jul 13 17:46:50 2020 daemon.info miniupnpd[15317]: specific IPv6 ext if
Mon Jul 13 17:46:50 2020 daemon.info miniupnpd[15317]: STUN: Performing with host=stun.ideasip.com and port=0 ...
Mon Jul 13 17:46:50 2020 daemon.debug miniupnpd[15317]: resolve_stun_host: stun.ideasip.com:3478 => 77.72.169.213:3478
Mon Jul 13 17:46:50 2020 daemon.info miniupnpd[15317]: perform_stun: local ports 50018 35361 33743 58709
Mon Jul 13 17:46:50 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Mon Jul 13 17:46:50 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: received responses: 1
Mon Jul 13 17:46:50 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Mon Jul 13 17:46:53 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: select(): no more responses
Mon Jul 13 17:46:53 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Mon Jul 13 17:46:56 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: select(): no more responses
Mon Jul 13 17:46:56 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Mon Jul 13 17:46:59 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: select(): no more responses
Mon Jul 13 17:46:59 2020 daemon.debug miniupnpd[15317]: parse_stun_response: Type 0x0101, Length 36, Magic Cookie 2112a442
Mon Jul 13 17:46:59 2020 daemon.debug miniupnpd[15317]: parse_stun_response: MAPPED-ADDRESS 222.79.50.204:50018
Mon Jul 13 17:46:59 2020 daemon.debug miniupnpd[15317]: parse_stun_response: SOURCE-ADDRESS 77.72.169.213:3478
Mon Jul 13 17:46:59 2020 daemon.debug miniupnpd[15317]: parse_stun_response: CHANGED-ADDRESS 77.72.169.212:3479
Mon Jul 13 17:46:59 2020 daemon.notice miniupnpd[15317]: perform_stun: 1 response out of 4 received
Mon Jul 13 17:46:59 2020 daemon.warn miniupnpd[15317]: STUN: ext interface br-lan with IP address 192.168.1.1 is now behind restrictive NAT with public IP address 222.79.50.204: Port forwarding is now impossible
Mon Jul 13 17:46:59 2020 daemon.notice miniupnpd[15317]: HTTP listening on port 5000
Mon Jul 13 17:46:59 2020 daemon.notice miniupnpd[15317]: Listening for NAT-PMP/PCP traffic on port 5351
Mon Jul 13 17:47:00 2020 daemon.info miniupnpd[15317]: HTTP REQUEST from 192.168.1.25:45447 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: Host: 192.168.1.1:5000
Mon Jul 13 17:47:00 2020 daemon.info miniupnpd[15317]: HTTP REQUEST from 192.168.1.25:45448 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: Host: 192.168.1.1:5000
Mon Jul 13 17:47:00 2020 daemon.info miniupnpd[15317]: HTTP REQUEST from 192.168.1.25:45450 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: Host: 192.168.1.1:5000
Mon Jul 13 17:47:00 2020 daemon.info miniupnpd[15317]: HTTP REQUEST from 192.168.1.25:45449 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: Host: 192.168.1.1:5000
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: level=0 type=8
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: ifindex = 6 192.168.1.1
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: level=0 type=8
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: ifindex = 6 192.168.1.1
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: level=0 type=8

我发现一个骚操作
image
option external_ip '随意一个公网IP'
就可以强制开启转发功能。
不过实际效果可能是没有,只是心理上的安慰。

use_stun 这个和 external_ip 不能共存,二选一,开启 use_stun 需要同时配置 stun_host。

经过查找miniupnpd的源码,我找到了一个地方
如果 miniupnpd 发现外网的ip是内部地址(符合以下地址类型)
image
就会禁止添加转发
image
但是根据提示如果开启 ext_perform_stun=yes ,还是可以打开转发功能,经过翻看启动文件啥的
在 /etc/config/upnpd 添加这两项,即可开启转发
image
option use_stun '1' option stun_host 'stun.ideasip.com'
然后测试就正常了
image
image
如果有遇到此问题的,可以尝试一下。

改完后,要重启upnp服务吗,,重启upnp后还是没用。

发一下系统日志,我可以具体看一下是什么问题(upnp勾选 启用额外的日志)

Tue Jul 14 10:41:31 2020 daemon.notice miniupnpd[3654]: shutting down MiniUPnPd
Tue Jul 14 10:41:31 2020 daemon.info miniupnpd[10636]: system uptime is 413301 seconds
Tue Jul 14 10:41:31 2020 daemon.info miniupnpd[10636]: Reloading rules from lease file
Tue Jul 14 10:41:31 2020 daemon.info miniupnpd[10636]: version 2.1.20200510 starting NAT-PMP/PCP UPnP-IGD ext if eth2 BOOTID=1594694491
Tue Jul 14 10:41:31 2020 daemon.info miniupnpd[10636]: specific IPv6 ext if
Tue Jul 14 10:41:31 2020 daemon.info miniupnpd[10636]: STUN: Performing with host=stun.ideasip.com and port=0 ...
Tue Jul 14 10:41:31 2020 daemon.debug miniupnpd[10636]: resolve_stun_host: stun.ideasip.com:3478 => 77.72.169.211:3478
Tue Jul 14 10:41:31 2020 daemon.info miniupnpd[10636]: perform_stun: local ports 40444 54541 47899 43511
Tue Jul 14 10:41:31 2020 daemon.debug miniupnpd[10636]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Tue Jul 14 10:41:34 2020 daemon.debug miniupnpd[10636]: wait_for_stun_responses: select(): no more responses
Tue Jul 14 10:41:34 2020 daemon.debug miniupnpd[10636]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Tue Jul 14 10:41:37 2020 daemon.debug miniupnpd[10636]: wait_for_stun_responses: select(): no more responses
Tue Jul 14 10:41:37 2020 daemon.debug miniupnpd[10636]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Tue Jul 14 10:41:40 2020 daemon.debug miniupnpd[10636]: wait_for_stun_responses: select(): no more responses
Tue Jul 14 10:41:40 2020 daemon.err miniupnpd[10636]: STUN: Performing STUN failed: No such device or address
Tue Jul 14 10:41:40 2020 daemon.err miniupnpd[10636]: Performing STUN failed. EXITING

最新版源码,经测试不用修改楼上的设置,「活动的UPnP重定向」正常,系统日志也没再有关于UPnP的错误。

固件版本:OpenWrt R20.7.7 / LuCI Master (git-20.191.36863-eee6bae)

最新版源码,经测试不用修改楼上的设置,就可以正常使用。

固件版本:OpenWrt R20.7.7 / LuCI Master (git-20.191.36863-eee6bae)

如果直接路由器拨号,有公网,是可以正常使用的。

最新版源码,经测试不用修改楼上的设置,就可以正常使用。
固件版本:OpenWrt R20.7.7 / LuCI Master (git-20.191.36863-eee6bae)

如果直接路由器拨号,有公网,是可以正常使用的。

上几天编译的版本,显示如下错误哦
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=474, dest=[ff0e::c]:1900): sendto: Permission denied

Tue Jul 14 10:41:31 2020 daemon.notice miniupnpd[3654]: shutting down MiniUPnPd
Tue Jul 14 10:41:31 2020 daemon.info miniupnpd[10636]: system uptime is 413301 seconds
Tue Jul 14 10:41:31 2020 daemon.info miniupnpd[10636]: Reloading rules from lease file
Tue Jul 14 10:41:31 2020 daemon.info miniupnpd[10636]: version 2.1.20200510 starting NAT-PMP/PCP UPnP-IGD ext if eth2 BOOTID=1594694491
Tue Jul 14 10:41:31 2020 daemon.info miniupnpd[10636]: specific IPv6 ext if
Tue Jul 14 10:41:31 2020 daemon.info miniupnpd[10636]: STUN: Performing with host=stun.ideasip.com and port=0 ...
Tue Jul 14 10:41:31 2020 daemon.debug miniupnpd[10636]: resolve_stun_host: stun.ideasip.com:3478 => 77.72.169.211:3478
Tue Jul 14 10:41:31 2020 daemon.info miniupnpd[10636]: perform_stun: local ports 40444 54541 47899 43511
Tue Jul 14 10:41:31 2020 daemon.debug miniupnpd[10636]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Tue Jul 14 10:41:34 2020 daemon.debug miniupnpd[10636]: wait_for_stun_responses: select(): no more responses
Tue Jul 14 10:41:34 2020 daemon.debug miniupnpd[10636]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Tue Jul 14 10:41:37 2020 daemon.debug miniupnpd[10636]: wait_for_stun_responses: select(): no more responses
Tue Jul 14 10:41:37 2020 daemon.debug miniupnpd[10636]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Tue Jul 14 10:41:40 2020 daemon.debug miniupnpd[10636]: wait_for_stun_responses: select(): no more responses
Tue Jul 14 10:41:40 2020 daemon.err miniupnpd[10636]: STUN: Performing STUN failed: No such device or address
Tue Jul 14 10:41:40 2020 daemon.err miniupnpd[10636]: Performing STUN failed. EXITING

它找不到你 IPV6 的 if,先禁用 miniupnpd 的 ipv6
配置加上
option ipv6_disable '1'

最新版源码,经测试不用修改楼上的设置,就可以正常使用。
固件版本:OpenWrt R20.7.7 / LuCI Master (git-20.191.36863-eee6bae)

如果直接路由器拨号,有公网,是可以正常使用的。

上几天编译的版本,显示如下错误哦
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=474, dest=[ff0e::c]:1900): sendto: Permission denied

这个偶尔出现不是什么大问题,它只是发送数据包错误而已。

最新版源码,经测试不用修改楼上的设置,就可以正常使用。
固件版本:OpenWrt R20.7.7 / LuCI Master (git-20.191.36863-eee6bae)

如果直接路由器拨号,有公网,是可以正常使用的。

我就是软路由拨号,有公网ip,怎么不可以啊

最新版源码,经测试不用修改楼上的设置,就可以正常使用。
固件版本:OpenWrt R20.7.7 / LuCI Master (git-20.191.36863-eee6bae)

如果直接路由器拨号,有公网,是可以正常使用的。

我就是软路由拨号,有公网ip,怎么不可以啊

所以新版的miniupnpd很玄学,可以尝试以上方法,看看有没有效。

最新版源码,经测试不用修改楼上的设置,「活动的UPnP重定向」正常,系统日志也没再有关于UPnP的错误。

固件版本:OpenWrt R20.7.7 / LuCI Master (git-20.191.36863-eee6bae)

你是同步到哪天的?我是同步到 Jul 8, 2020。

按你的方法之前:
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: version 2.1.20200510 starting NAT-PMP/PCP UPnP-IGD ext if br-lan BOOTID=1594633439
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: specific IPv6 ext if
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: Reserved / private IP address 192.168.1.1 on ext interface br-lan: Port forwarding is impossible
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: You are probably behind NAT, enable option ext_perform_stun=yes to detect public IP address
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: Or use ext_ip= / -o option to declare public IP address
Mon Jul 13 17:43:59 2020 daemon.notice miniupnpd[13520]: HTTP listening on port 5000
Mon Jul 13 17:43:59 2020 daemon.notice miniupnpd[13520]: Listening for NAT-PMP/PCP traffic on port 5351
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: HTTP REQUEST from 192.168.1.25:45399 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: Host: 192.168.1.1:5000
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: HTTP REQUEST from 192.168.1.25:45400 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: Host: 192.168.1.1:5000
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: HTTP REQUEST from 192.168.1.25:45401 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: Host: 192.168.1.1:5000
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: HTTP REQUEST from 192.168.1.25:45402 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: Host: 192.168.1.1:5000
Mon Jul 13 17:44:00 2020 daemon.debug miniupnpd[13520]: level=0 type=8
Mon Jul 13 17:44:00 2020 daemon.debug miniupnpd[13520]: ifindex = 6 192.168.1.1
Mon Jul 13 17:44:00 2020 daemon.debug miniupnpd[13520]: level=0 type=8
按你的方法之后:
Mon Jul 13 17:46:50 2020 daemon.info miniupnpd[15317]: version 2.1.20200510 starting NAT-PMP/PCP UPnP-IGD ext if br-lan BOOTID=1594633610
Mon Jul 13 17:46:50 2020 daemon.info miniupnpd[15317]: specific IPv6 ext if
Mon Jul 13 17:46:50 2020 daemon.info miniupnpd[15317]: STUN: Performing with host=stun.ideasip.com and port=0 ...
Mon Jul 13 17:46:50 2020 daemon.debug miniupnpd[15317]: resolve_stun_host: stun.ideasip.com:3478 => 77.72.169.213:3478
Mon Jul 13 17:46:50 2020 daemon.info miniupnpd[15317]: perform_stun: local ports 50018 35361 33743 58709
Mon Jul 13 17:46:50 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Mon Jul 13 17:46:50 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: received responses: 1
Mon Jul 13 17:46:50 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Mon Jul 13 17:46:53 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: select(): no more responses
Mon Jul 13 17:46:53 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Mon Jul 13 17:46:56 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: select(): no more responses
Mon Jul 13 17:46:56 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Mon Jul 13 17:46:59 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: select(): no more responses
Mon Jul 13 17:46:59 2020 daemon.debug miniupnpd[15317]: parse_stun_response: Type 0x0101, Length 36, Magic Cookie 2112a442
Mon Jul 13 17:46:59 2020 daemon.debug miniupnpd[15317]: parse_stun_response: MAPPED-ADDRESS 222.79.50.204:50018
Mon Jul 13 17:46:59 2020 daemon.debug miniupnpd[15317]: parse_stun_response: SOURCE-ADDRESS 77.72.169.213:3478
Mon Jul 13 17:46:59 2020 daemon.debug miniupnpd[15317]: parse_stun_response: CHANGED-ADDRESS 77.72.169.212:3479
Mon Jul 13 17:46:59 2020 daemon.notice miniupnpd[15317]: perform_stun: 1 response out of 4 received
Mon Jul 13 17:46:59 2020 daemon.warn miniupnpd[15317]: STUN: ext interface br-lan with IP address 192.168.1.1 is now behind restrictive NAT with public IP address 222.79.50.204: Port forwarding is now impossible
Mon Jul 13 17:46:59 2020 daemon.notice miniupnpd[15317]: HTTP listening on port 5000
Mon Jul 13 17:46:59 2020 daemon.notice miniupnpd[15317]: Listening for NAT-PMP/PCP traffic on port 5351
Mon Jul 13 17:47:00 2020 daemon.info miniupnpd[15317]: HTTP REQUEST from 192.168.1.25:45447 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: Host: 192.168.1.1:5000
Mon Jul 13 17:47:00 2020 daemon.info miniupnpd[15317]: HTTP REQUEST from 192.168.1.25:45448 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: Host: 192.168.1.1:5000
Mon Jul 13 17:47:00 2020 daemon.info miniupnpd[15317]: HTTP REQUEST from 192.168.1.25:45450 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: Host: 192.168.1.1:5000
Mon Jul 13 17:47:00 2020 daemon.info miniupnpd[15317]: HTTP REQUEST from 192.168.1.25:45449 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: Host: 192.168.1.1:5000
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: level=0 type=8
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: ifindex = 6 192.168.1.1
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: level=0 type=8
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: ifindex = 6 192.168.1.1
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: level=0 type=8

查了一下,你的情况是,它对stun服务器发送了4个请求,只成功接收了一个,判定你的是限制型NAT,就不给你开放功能了。
这种情况除了改源码 miniupnpd.c 的第 2152 行,disable_port_forwarding = 1 改为 0,别无他法(而且只改一个地方好像也不行)。
而且限制型NAT开了 upnp 也没有什么效果。

我的原本就有公网IP,只不过是光猫拨号,添加这两个选项就有效。1:1非限制型NAT。

我用用电脑测NAT类型,是NAT1啊
image

最新版源码,经测试不用修改楼上的设置,就可以正常使用。
固件版本:OpenWrt R20.7.7 / LuCI Master (git-20.191.36863-eee6bae)

如果直接路由器拨号,有公网,是可以正常使用的。

上几天编译的版本,显示如下错误哦
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=474, dest=[ff0e::c]:1900): sendto: Permission denied

这个偶尔出现不是什么大问题,它只是发送数据包错误而已。

这个错误是开机后就一直出现,每秒几条日志,哈哈。不过现在正常了就不管了。谢谢你

最新版源码,经测试不用修改楼上的设置,「活动的UPnP重定向」正常,系统日志也没再有关于UPnP的错误。
固件版本:OpenWrt R20.7.7 / LuCI Master (git-20.191.36863-eee6bae)

你是同步到哪天的?我是同步到 Jul 8, 2020。

我是昨天(2020.7.13)重新拉取代码编译的。

按你的方法之前:
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: version 2.1.20200510 starting NAT-PMP/PCP UPnP-IGD ext if br-lan BOOTID=1594633439
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: specific IPv6 ext if
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: Reserved / private IP address 192.168.1.1 on ext interface br-lan: Port forwarding is impossible
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: You are probably behind NAT, enable option ext_perform_stun=yes to detect public IP address
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: Or use ext_ip= / -o option to declare public IP address
Mon Jul 13 17:43:59 2020 daemon.notice miniupnpd[13520]: HTTP listening on port 5000
Mon Jul 13 17:43:59 2020 daemon.notice miniupnpd[13520]: Listening for NAT-PMP/PCP traffic on port 5351
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: HTTP REQUEST from 192.168.1.25:45399 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: Host: 192.168.1.1:5000
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: HTTP REQUEST from 192.168.1.25:45400 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: Host: 192.168.1.1:5000
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: HTTP REQUEST from 192.168.1.25:45401 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: Host: 192.168.1.1:5000
Mon Jul 13 17:43:59 2020 daemon.info miniupnpd[13520]: HTTP REQUEST from 192.168.1.25:45402 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:43:59 2020 daemon.debug miniupnpd[13520]: Host: 192.168.1.1:5000
Mon Jul 13 17:44:00 2020 daemon.debug miniupnpd[13520]: level=0 type=8
Mon Jul 13 17:44:00 2020 daemon.debug miniupnpd[13520]: ifindex = 6 192.168.1.1
Mon Jul 13 17:44:00 2020 daemon.debug miniupnpd[13520]: level=0 type=8
按你的方法之后:
Mon Jul 13 17:46:50 2020 daemon.info miniupnpd[15317]: version 2.1.20200510 starting NAT-PMP/PCP UPnP-IGD ext if br-lan BOOTID=1594633610
Mon Jul 13 17:46:50 2020 daemon.info miniupnpd[15317]: specific IPv6 ext if
Mon Jul 13 17:46:50 2020 daemon.info miniupnpd[15317]: STUN: Performing with host=stun.ideasip.com and port=0 ...
Mon Jul 13 17:46:50 2020 daemon.debug miniupnpd[15317]: resolve_stun_host: stun.ideasip.com:3478 => 77.72.169.213:3478
Mon Jul 13 17:46:50 2020 daemon.info miniupnpd[15317]: perform_stun: local ports 50018 35361 33743 58709
Mon Jul 13 17:46:50 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Mon Jul 13 17:46:50 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: received responses: 1
Mon Jul 13 17:46:50 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Mon Jul 13 17:46:53 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: select(): no more responses
Mon Jul 13 17:46:53 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Mon Jul 13 17:46:56 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: select(): no more responses
Mon Jul 13 17:46:56 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Mon Jul 13 17:46:59 2020 daemon.debug miniupnpd[15317]: wait_for_stun_responses: select(): no more responses
Mon Jul 13 17:46:59 2020 daemon.debug miniupnpd[15317]: parse_stun_response: Type 0x0101, Length 36, Magic Cookie 2112a442
Mon Jul 13 17:46:59 2020 daemon.debug miniupnpd[15317]: parse_stun_response: MAPPED-ADDRESS 222.79.50.204:50018
Mon Jul 13 17:46:59 2020 daemon.debug miniupnpd[15317]: parse_stun_response: SOURCE-ADDRESS 77.72.169.213:3478
Mon Jul 13 17:46:59 2020 daemon.debug miniupnpd[15317]: parse_stun_response: CHANGED-ADDRESS 77.72.169.212:3479
Mon Jul 13 17:46:59 2020 daemon.notice miniupnpd[15317]: perform_stun: 1 response out of 4 received
Mon Jul 13 17:46:59 2020 daemon.warn miniupnpd[15317]: STUN: ext interface br-lan with IP address 192.168.1.1 is now behind restrictive NAT with public IP address 222.79.50.204: Port forwarding is now impossible
Mon Jul 13 17:46:59 2020 daemon.notice miniupnpd[15317]: HTTP listening on port 5000
Mon Jul 13 17:46:59 2020 daemon.notice miniupnpd[15317]: Listening for NAT-PMP/PCP traffic on port 5351
Mon Jul 13 17:47:00 2020 daemon.info miniupnpd[15317]: HTTP REQUEST from 192.168.1.25:45447 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: Host: 192.168.1.1:5000
Mon Jul 13 17:47:00 2020 daemon.info miniupnpd[15317]: HTTP REQUEST from 192.168.1.25:45448 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: Host: 192.168.1.1:5000
Mon Jul 13 17:47:00 2020 daemon.info miniupnpd[15317]: HTTP REQUEST from 192.168.1.25:45450 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: Host: 192.168.1.1:5000
Mon Jul 13 17:47:00 2020 daemon.info miniupnpd[15317]: HTTP REQUEST from 192.168.1.25:45449 : GET /rootDesc.xml (HTTP/1.1)
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: accept-language HTTP header : 'en-us'
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: Host: 192.168.1.1:5000
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: level=0 type=8
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: ifindex = 6 192.168.1.1
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: level=0 type=8
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: ifindex = 6 192.168.1.1
Mon Jul 13 17:47:00 2020 daemon.debug miniupnpd[15317]: level=0 type=8

查了一下,你的情况是,它对stun服务器发送了4个请求,只成功接收了一个,判定你的是限制型NAT,就不给你开放功能了。
这种情况除了改源码 miniupnpd.c 的第 2152 行,disable_port_forwarding = 1 改为 0,别无他法(而且只改一个地方好像也不行)。
而且限制型NAT开了 upnp 也没有什么效果。
我的原本就有公网IP,只不过是光猫拨号,添加这两个选项就有效。1:1非限制型NAT。

我用用电脑测NAT类型,是NAT1啊
image

那你试试把 stun_host 的值换成你软件上那个 stun 服务器地址。

最新版源码,经测试不用修改楼上的设置,就可以正常使用。
固件版本:OpenWrt R20.7.7 / LuCI Master (git-20.191.36863-eee6bae)

如果直接路由器拨号,有公网,是可以正常使用的。

上几天编译的版本,显示如下错误哦
Mon Jul 13 10:39:09 2020 daemon.err miniupnpd[7543]: try_sendto(sock=8, len=474, dest=[ff0e::c]:1900): sendto: Permission denied

这个偶尔出现不是什么大问题,它只是发送数据包错误而已。

这个错误是开机后就一直出现,每秒几条日志,哈哈。不过现在正常了就不管了。谢谢你

估计是跟IPV6有关系

移动IPV4内网,IPV6公网, Upnp完美运行需要关闭IPV6和修改源代码。
电信或联通有公网IPV4的,只需要关闭IPV6就可以完美运行了。

  1. 关闭IPV6, miniupnpd.init 文件 ipv6_disable修改为1。

image

  1. 修改dl文件夹下miniupnpd-2.1.20200510.tar.gz源代码,把内网IP检测方法永远return 0。

image

  1. 修改完重新编译,移动大内网就可以完美运行了,理论上有公网IP地址的是更没有问题的。

image

image

  1. 如果不修改源代码,只修改配置文件option external_ip '随意一个公网IP',SOAP请求还是会失败,HTTP请求会成功,对于手机迅雷,都是SOAP请求,所以在UPNP列表不出现手机迅雷的请求,对于电脑版迅雷是有SOAP和HTTP两种请求的,HTTP请求会成功,列表中只会显示两条MiniTP SDK记录,所以必须通过修改源代码的方式才能完美修复SOAP请求。

image

Tue Jul 14 10:41:31 2020 daemon.notice miniupnpd[3654]: shutting down MiniUPnPd
Tue Jul 14 10:41:31 2020 daemon.info miniupnpd[10636]: system uptime is 413301 seconds
Tue Jul 14 10:41:31 2020 daemon.info miniupnpd[10636]: Reloading rules from lease file
Tue Jul 14 10:41:31 2020 daemon.info miniupnpd[10636]: version 2.1.20200510 starting NAT-PMP/PCP UPnP-IGD ext if eth2 BOOTID=1594694491
Tue Jul 14 10:41:31 2020 daemon.info miniupnpd[10636]: specific IPv6 ext if
Tue Jul 14 10:41:31 2020 daemon.info miniupnpd[10636]: STUN: Performing with host=stun.ideasip.com and port=0 ...
Tue Jul 14 10:41:31 2020 daemon.debug miniupnpd[10636]: resolve_stun_host: stun.ideasip.com:3478 => 77.72.169.211:3478
Tue Jul 14 10:41:31 2020 daemon.info miniupnpd[10636]: perform_stun: local ports 40444 54541 47899 43511
Tue Jul 14 10:41:31 2020 daemon.debug miniupnpd[10636]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Tue Jul 14 10:41:34 2020 daemon.debug miniupnpd[10636]: wait_for_stun_responses: select(): no more responses
Tue Jul 14 10:41:34 2020 daemon.debug miniupnpd[10636]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Tue Jul 14 10:41:37 2020 daemon.debug miniupnpd[10636]: wait_for_stun_responses: select(): no more responses
Tue Jul 14 10:41:37 2020 daemon.debug miniupnpd[10636]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Tue Jul 14 10:41:40 2020 daemon.debug miniupnpd[10636]: wait_for_stun_responses: select(): no more responses
Tue Jul 14 10:41:40 2020 daemon.err miniupnpd[10636]: STUN: Performing STUN failed: No such device or address
Tue Jul 14 10:41:40 2020 daemon.err miniupnpd[10636]: Performing STUN failed. EXITING

它找不到你 IPV6 的 if,先禁用 miniupnpd 的 ipv6
配置加上
option ipv6_disable '1'

image
image
image

好像还没用。。。

Tue Jul 14 10:41:31 2020 daemon.notice miniupnpd[3654]: shutting down MiniUPnPd
Tue Jul 14 10:41:31 2020 daemon.info miniupnpd[10636]: system uptime is 413301 seconds
Tue Jul 14 10:41:31 2020 daemon.info miniupnpd[10636]: Reloading rules from lease file
Tue Jul 14 10:41:31 2020 daemon.info miniupnpd[10636]: version 2.1.20200510 starting NAT-PMP/PCP UPnP-IGD ext if eth2 BOOTID=1594694491
Tue Jul 14 10:41:31 2020 daemon.info miniupnpd[10636]: specific IPv6 ext if
Tue Jul 14 10:41:31 2020 daemon.info miniupnpd[10636]: STUN: Performing with host=stun.ideasip.com and port=0 ...
Tue Jul 14 10:41:31 2020 daemon.debug miniupnpd[10636]: resolve_stun_host: stun.ideasip.com:3478 => 77.72.169.211:3478
Tue Jul 14 10:41:31 2020 daemon.info miniupnpd[10636]: perform_stun: local ports 40444 54541 47899 43511
Tue Jul 14 10:41:31 2020 daemon.debug miniupnpd[10636]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Tue Jul 14 10:41:34 2020 daemon.debug miniupnpd[10636]: wait_for_stun_responses: select(): no more responses
Tue Jul 14 10:41:34 2020 daemon.debug miniupnpd[10636]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Tue Jul 14 10:41:37 2020 daemon.debug miniupnpd[10636]: wait_for_stun_responses: select(): no more responses
Tue Jul 14 10:41:37 2020 daemon.debug miniupnpd[10636]: wait_for_stun_responses: waiting 3 secs and 0 usecs
Tue Jul 14 10:41:40 2020 daemon.debug miniupnpd[10636]: wait_for_stun_responses: select(): no more responses
Tue Jul 14 10:41:40 2020 daemon.err miniupnpd[10636]: STUN: Performing STUN failed: No such device or address
Tue Jul 14 10:41:40 2020 daemon.err miniupnpd[10636]: Performing STUN failed. EXITING

它找不到你 IPV6 的 if,先禁用 miniupnpd 的 ipv6
配置加上
option ipv6_disable '1'

image
image
image

好像还没用。。。

可以根据上面的提示,修改源码,重新编译。

移动IPV4内网,IPV6公网, Upnp完美运行需要关闭IPV6和修改源代码。
电信或联通有公网IPV4的,只需要关闭IPV6就可以完美运行了。

  1. 关闭IPV6, miniupnpd.init 文件 ipv6_disable修改为1。

image

  1. 修改dl文件夹下miniupnpd-2.1.20200510.tar.gz源代码,把内网IP检测方法永远return 0。

image

  1. 修改完重新编译,移动大内网就可以完美运行了,理论上有公网IP地址的是更没有问题的。

image

image

  1. 如果不修改源代码,只修改配置文件option external_ip '随意一个公网IP',SOAP请求还是会失败,HTTP请求会成功,对于手机迅雷,都是SOAP请求,所以在UPNP列表不出现手机迅雷的请求,对于电脑版迅雷是有SOAP和HTTP两种请求的,HTTP请求会成功,列表中只会显示两条MiniTP SDK记录,所以必须通过修改源代码的方式才能完美修复SOAP请求。

image

可以整个patch。

移动IPV4内网,IPV6公网, Upnp完美运行需要关闭IPV6和修改源代码。
电信或联通有公网IPV4的,只需要关闭IPV6就可以完美运行了。

  1. 关闭IPV6, miniupnpd.init 文件 ipv6_disable修改为1。

image

  1. 修改dl文件夹下miniupnpd-2.1.20200510.tar.gz源代码,把内网IP检测方法永远return 0。

image

  1. 修改完重新编译,移动大内网就可以完美运行了,理论上有公网IP地址的是更没有问题的。

image

image

  1. 如果不修改源代码,只修改配置文件option external_ip '随意一个公网IP',SOAP请求还是会失败,HTTP请求会成功,对于手机迅雷,都是SOAP请求,所以在UPNP列表不出现手机迅雷的请求,对于电脑版迅雷是有SOAP和HTTP两种请求的,HTTP请求会成功,列表中只会显示两条MiniTP SDK记录,所以必须通过修改源代码的方式才能完美修复SOAP请求。

image

在外网测试这个端口是开放的吗?现在最新源码编译,不用修改,电信网络测试upnp正常。

移动IPV4内网,IPV6公网, Upnp完美运行需要关闭IPV6和修改源代码。
电信或联通有公网IPV4的,只需要关闭IPV6就可以完美运行了。

  1. 关闭IPV6, miniupnpd.init 文件 ipv6_disable修改为1。

image

  1. 修改dl文件夹下miniupnpd-2.1.20200510.tar.gz源代码,把内网IP检测方法永远return 0。

image

  1. 修改完重新编译,移动大内网就可以完美运行了,理论上有公网IP地址的是更没有问题的。

image

image

  1. 如果不修改源代码,只修改配置文件option external_ip '随意一个公网IP',SOAP请求还是会失败,HTTP请求会成功,对于手机迅雷,都是SOAP请求,所以在UPNP列表不出现手机迅雷的请求,对于电脑版迅雷是有SOAP和HTTP两种请求的,HTTP请求会成功,列表中只会显示两条MiniTP SDK记录,所以必须通过修改源代码的方式才能完美修复SOAP请求。

image

内网开upnp有作用吗

移动IPV4内网,IPV6公网,Upnp完美运行需要关闭IPV6和修改源代码。
电信或联通有公网IPV4的,只需要关闭IPV6就可以完美运行了。

  1. 关闭IPV6,miniupnpd.init文件ipv6_disable修改为1。

图片

  1. 修改dl文件夹下miniupnpd-2.1.20200510.tar.gz源代码,把内网IP检测方法永远返回0。

图片

  1. 修改完重新编译,移动大内网就可以完美运行了,理论上有公网IP地址的是更没有问题的。

图片
图片

  1. 如果不修改源代码,只修改了配置文件option external_ip'随意一个公网IP',SOAP请求还是会失败,HTTP请求会成功,对于手机迅雷,都是SOAP请求,所以在UPNP列表不出现手机迅雷的请求,对于电脑版迅雷是有SOAP和HTTP两个请求的,HTTP请求会成功,列表中只会显示两个MiniTP SDK记录,因此必须通过修改源代码的方式才能完美地修复SOAP请求。

图片

内网开upnp有作用吗

我按照您的方法 玩街霸依然是无法和朋友联机 换回老版本的固件就没问题 头疼

不折腾了,老老实实换回旧版2017的miniupnpd,完美工作

不折腾了,老老实实换回旧版2017的miniupnpd,完美工作

2017版的ipk麻烦发我邮箱下 [email protected] 谢谢

不折腾了,老老实实换回旧版2017的miniupnpd,完美工作

是在5.4内核下编译的2017版吗

不折腾了,老老实实换回旧版2017的miniupnpd,完美工作

是在5.4内核下编译的2017版吗

是的

不折腾了,老老实实换回旧版2017的miniupnpd,完美工作

是在5.4内核下编译的2017版吗

是的

谢谢,你是arm的cpu? 我是x86的。。。。

不折腾了,老老实实换回旧版2017的miniupnpd,完美工作

是在5.4内核下编译的2017版吗

是的

谢谢,你是arm的cpu? 我是x86的。。。。

是啊 armv7

不折腾了,老老实实换回旧版2017的miniupnpd,完美工作

是在5.4内核下编译的2017版吗

是的

谢谢,你是arm的cpu? 我是x86的。。。。

是啊 armv7

2017 版本的在哪找?我也依旧不能打开UPNP,方便的话告之一下,晚上回去编译一个 x86 的替换掉好了~

不折腾了,老老实实换回旧版2017的miniupnpd,完美工作

是在5.4内核下编译的2017版吗

是的

谢谢,你是arm的cpu? 我是x86的。。。。

是啊 armv7

2017 版本的在哪找?我也依旧不能打开UPNP,方便的话告之一下,晚上回去编译一个 x86 的替换掉好了~
https://github.com/coolsnowwolf/packages/tree/147ca535cb26a0c42d5b807a3abfc8a15d396a68/net/miniupnpd 把feeds和dl里面的miniupnpd删了,再重新update和install feeds,下载dl就行

不折腾了,老老实实换回旧版2017的miniupnpd,完美工作

是在5.4内核下编译的2017版吗

是的

谢谢,你是arm的cpu? 我是x86的。。。。

是啊 armv7

2017 版本的在哪找?我也依旧不能打开UPNP,方便的话告之一下,晚上回去编译一个 x86 的替换掉好了~

http://lover.ink:8666/%E5%8D%95%E7%8B%AC%E6%8F%92%E4%BB%B6%E5%8C%85/UPNP/ 别人分享的,未测试

不折腾了,老老实实换回旧版2017的miniupnpd,完美工作

是在5.4内核下编译的2017版吗

是的

谢谢,你是arm的cpu? 我是x86的。。。。

是啊 armv7

2017 版本的在哪找?我也依旧不能打开UPNP,方便的话告之一下,晚上回去编译一个 x86 的替换掉好了~
https://github.com/coolsnowwolf/packages/tree/147ca535cb26a0c42d5b807a3abfc8a15d396a68/net/miniupnpd 把feeds和dl里面的miniupnpd删了,再重新update和install feeds,下载dl就行

编译报错了

有一说一,我之前维护的那个 miniupnpd 版本确实更适合国内的应用。。。。

不能回退了吗,NAS挂的QBT都没法用

有一说一,我之前维护的那个 miniupnpd 版本确实更适合国内的应用。。。。

求回退之前那版

不折腾了,老老实实换回旧版2017的miniupnpd,完美工作

是在5.4内核下编译的2017版吗

是的

谢谢,你是arm的cpu? 我是x86的。。。。

是啊 armv7

2017 版本的在哪找?我也依旧不能打开UPNP,方便的话告之一下,晚上回去编译一个 x86 的替换掉好了~
https://github.com/coolsnowwolf/packages/tree/147ca535cb26a0c42d5b807a3abfc8a15d396a68/net/miniupnpd 把feeds和dl里面的miniupnpd删了,再重新update和install feeds,下载dl就行

编译报错了

需要修改一下miniupnpd/netfilter/iptcrdr.c这个文件。不然5.4的内核会不兼容,具体可以看这里这个commit,根据这两个commit修改。就能编译老版的miniupnpd了

不折腾了,老老实实换回旧版2017的miniupnpd,完美工作

是在5.4内核下编译的2017版吗

是的

谢谢,你是arm的cpu? 我是x86的。。。。

是啊 armv7

2017 版本的在哪找?我也依旧不能打开UPNP,方便的话告之一下,晚上回去编译一个 x86 的替换掉好了~

http://lover.ink:8666/%E5%8D%95%E7%8B%AC%E6%8F%92%E4%BB%B6%E5%8C%85/UPNP/ 别人分享的,未测试

红米ac2100 测试OK

不折腾了,老老实实换回旧版2017的miniupnpd,完美工作

是在5.4内核下编译的2017版吗

是的

谢谢,你是arm的cpu? 我是x86的。。。。

是啊 armv7

2017 版本的在哪找?我也依旧不能打开UPNP,方便的话告之一下,晚上回去编译一个 x86 的替换掉好了~
https://github.com/coolsnowwolf/packages/tree/147ca535cb26a0c42d5b807a3abfc8a15d396a68/net/miniupnpd 把feeds和dl里面的miniupnpd删了,再重新update和install feeds,下载dl就行

编译报错了

需要修改一下miniupnpd/netfilter/iptcrdr.c这个文件。不然5.4的内核会不兼容,具体可以看这里这个commit,根据这两个commit修改。就能编译老版的miniupnpd了

我不太明白,这里https://github.com/coolsnowwolf/packages/tree/147ca535cb26a0c42d5b807a3abfc8a15d396a68/net/miniupnpd 并没有你所说的文件

不折腾了,老老实实换回旧版2017的miniupnpd,完美工作

是在5.4内核下编译的2017版吗

是的

谢谢,你是arm的cpu? 我是x86的。。。。

是啊 armv7

2017 版本的在哪找?我也依旧不能打开UPNP,方便的话告之一下,晚上回去编译一个 x86 的替换掉好了~
https://github.com/coolsnowwolf/packages/tree/147ca535cb26a0c42d5b807a3abfc8a15d396a68/net/miniupnpd 把feeds和dl里面的miniupnpd删了,再重新update和install feeds,下载dl就行

编译报错了

需要修改一下miniupnpd/netfilter/iptcrdr.c这个文件。不然5.4的内核会不兼容,具体可以看这里这个commit,根据这两个commit修改。就能编译老版的miniupnpd了

我不太明白,这里https://github.com/coolsnowwolf/packages/tree/147ca535cb26a0c42d5b807a3abfc8a15d396a68/net/miniupnpd 并没有你所说的文件

这个文件是编译中下载的。在packages里面是看不到的。我做了个包https://github.com/zmzhuai/R2S-OpenWrt/raw/old-miniupnpd/miniupnpd.tar.gz 。可以直接替换miniupnpd文件夹。就能编译通过了。你可以下载下来试试

感谢各位的付出,晚上回家搞起来。
1.安装2017的ipk;
2.编译源码(官方修改,或者老源码)

不折腾了,老老实实换回旧版2017的miniupnpd,完美工作

是在5.4内核下编译的2017版吗

是的

谢谢,你是arm的cpu? 我是x86的。。。。

是啊 armv7

2017 版本的在哪找?我也依旧不能打开UPNP,方便的话告之一下,晚上回去编译一个 x86 的替换掉好了~
https://github.com/coolsnowwolf/packages/tree/147ca535cb26a0c42d5b807a3abfc8a15d396a68/net/miniupnpd 把feeds和dl里面的miniupnpd删了,再重新update和install feeds,下载dl就行

编译报错了

需要修改一下miniupnpd/netfilter/iptcrdr.c这个文件。不然5.4的内核会不兼容,具体可以看这里这个commit,根据这两个commit修改。就能编译老版的miniupnpd了

我按照这两个commit修改iptcrdr.c依然不能通过编译

不折腾了,老老实实换回旧版2017的miniupnpd,完美工作

是在5.4内核下编译的2017版吗

是的

谢谢,你是arm的cpu? 我是x86的。。。。

是啊 armv7

2017 版本的在哪找?我也依旧不能打开UPNP,方便的话告之一下,晚上回去编译一个 x86 的替换掉好了~
https://github.com/coolsnowwolf/packages/tree/147ca535cb26a0c42d5b807a3abfc8a15d396a68/net/miniupnpd 把feeds和dl里面的miniupnpd删了,再重新update和install feeds,下载dl就行

编译报错了

需要修改一下miniupnpd/netfilter/iptcrdr.c这个文件。不然5.4的内核会不兼容,具体可以看这里这个commit,根据这两个commit修改。就能编译老版的miniupnpd了

我按照这两个commit修改iptcrdr.c依然不能通过编译

你用我上面提供的压缩包解压出miniupnpd替换调就好了。手动改有可能出错。

安装2017版,搞定

不折腾了,老老实实换回旧版2017的miniupnpd,完美工作

是在5.4内核下编译的2017版吗

是的

谢谢,你是arm的cpu? 我是x86的。。。。

是啊 armv7

2017 版本的在哪找?我也依旧不能打开UPNP,方便的话告之一下,晚上回去编译一个 x86 的替换掉好了~
https://github.com/coolsnowwolf/packages/tree/147ca535cb26a0c42d5b807a3abfc8a15d396a68/net/miniupnpd 把feeds和dl里面的miniupnpd删了,再重新update和install feeds,下载dl就行

编译报错了

需要修改一下miniupnpd/netfilter/iptcrdr.c这个文件。不然5.4的内核会不兼容,具体可以看这里这个commit,根据这两个commit修改。就能编译老版的miniupnpd了

我按照这两个commit修改iptcrdr.c依然不能通过编译

汇报进展:
1.安装2017ipk,可行
2.用2017源码编译,5.4内核,可行
感谢各位大佬。

汇报进展:
1.安装2017ipk,可行
2.用2017源码编译,5.4内核,可行
感谢各位大佬。

请问2017源码如何编译呢?请教一下

汇报进展:
1.安装2017ipk,可行
2.用2017源码编译,5.4内核,可行
感谢各位大佬。

请问2017源码如何编译呢?请教一下

同步完lean的链接源码后,删除miniupnpd文件夹,替换成上面有位大佬改好的源码,然后接着make menuconfig,然后编译。如上面所述,如果不替换成修改后的2017源码,5.4的内核会报错的(实践检验过)。

汇报进展:
1.安装2017ipk,可行
2.用2017源码编译,5.4内核,可行
感谢各位大佬。

请问2017源码如何编译呢?请教一下

同步完lean的链接源码后,删除miniupnpd文件夹,替换成上面有位大佬改好的源码,然后接着make menuconfig,然后编译。如上面所述,如果不替换成修改后的2017源码,5.4的内核会报错的(实践检验过)。

我替换了还是报错了

汇报进展:
1.安装2017ipk,可行
2.用2017源码编译,5.4内核,可行
感谢各位大佬。

请问2017源码如何编译呢?请教一下

同步完lean的链接源码后,删除miniupnpd文件夹,替换成上面有位大佬改好的源码,然后接着make menuconfig,然后编译。如上面所述,如果不替换成修改后的2017源码,5.4的内核会报错的(实践检验过)。

我替换了还是报错了

我是vps新机,ubuntu20.4,全新同步,无错。问题是不是在你源码同步上。

汇报进展:
1.安装2017ipk,可行
2.用2017源码编译,5.4内核,可行
感谢各位大佬。

请问2017源码如何编译呢?请教一下

同步完lean的链接源码后,删除miniupnpd文件夹,替换成上面有位大佬改好的源码,然后接着make menuconfig,然后编译。如上面所述,如果不替换成修改后的2017源码,5.4的内核会报错的(实践检验过)。

我替换了还是报错了

我是vps新机,ubuntu20.4,全新同步,无错。问题是不是在你源码同步上。

可能吧

移动宽带数量非常庞大,移动免费送,不要白不要

你修改了100.x移动大内网的代码了吗?

在5.4内核下编译的x86_64平台20170421版本miniupnpd,已自己替换过测试,迅雷等可以正常激活 upnp.
下载地址:https://github.com/DanielChen008/miniupnpd2017/releases/tag/20170421
包含luci安装文件

在5.4内核下编译的x86_64平台20170421版本miniupnpd,已自己替换过测试,迅雷等可以正常激活 upnp.
下载地址:https://github.com/DanielChen008/miniupnpd2017/releases/download/20170421/miniupnpd_2.0.20170421-2_x86_64.ipk

这个装完是没有图形界面的?

移动宽带数量非常庞大,移动免费送,不要白不要

你修改了100.x移动大内网的代码了吗?

https://github.com/coolsnowwolf/lede/issues/5020#issuecomment-658285795, 移动大内网,IPV4显示正常。DDNS,BT无线网络下载用IPV6,最快40M+,虽跑不满我的千兆移动大内网,不过一个月才20元,还要什么自行车。

IPV6 DDNS

image

BT下载速度:

image
image

在5.4内核下编译的x86_64平台20170421版本miniupnpd,已自己替换过测试,迅雷等可以正常激活 upnp.
下载地址:https://github.com/DanielChen008/miniupnpd2017/releases/download/20170421/miniupnpd_2.0.20170421-2_x86_64.ipk

这个装完是没有图形界面的?

从软件包里卸载,然后上传到路由器重新安装,Luci界面不需要更换。

在5.4内核下编译的x86_64平台20170421版本miniupnpd,已自己替换过测试,迅雷等可以正常激活 upnp.
下载地址:https://github.com/DanielChen008/miniupnpd2017/releases/download/20170421/miniupnpd_2.0.20170421-2_x86_64.ipk

这个装完是没有图形界面的?

从软件包里卸载,然后上传到路由器重新安装,Luci界面不需要更换。

我卸载了原来的miniupnpd 然后装了你这个 结果服务里面 就没有任何东西了,我是通过文件传输然后点安装的,需要puty和winscp吗

在5.4内核下编译的x86_64平台20170421版本miniupnpd,已自己替换过测试,迅雷等可以正常激活 upnp.
下载地址:https://github.com/DanielChen008/miniupnpd2017/releases/download/20170421/miniupnpd_2.0.20170421-2_x86_64.ipk

这个装完是没有图形界面的?

从软件包里卸载,然后上传到路由器重新安装,Luci界面不需要更换。

我卸载了原来的miniupnpd 然后装了你这个 结果服务里面 就没有任何东西了,我是通过文件传输然后点安装的,需要puty和winscp吗

我猜是因为卸载miniupnpd时系统一并卸载了luci-app-upnp,因为luci-app-upnp依赖于miniupnpd,可以在编译后的目录里找到luci-app-upnp.ipk,重新上传安装。

在5.4内核下编译的x86_64平台20170421版本miniupnpd,已自己替换过测试,迅雷等可以正常激活 upnp.
下载地址:https://github.com/DanielChen008/miniupnpd2017/releases/download/20170421/miniupnpd_2.0.20170421-2_x86_64.ipk

这个装完是没有图形界面的?

从软件包里卸载,然后上传到路由器重新安装,Luci界面不需要更换。

我卸载了原来的miniupnpd 然后装了你这个 结果服务里面 就没有任何东西了,我是通过文件传输然后点安装的,需要puty和winscp吗

我猜是因为卸载miniupnpd时系统一并卸载了luci-app-upnp,因为luci-app-upnp依赖于miniupnpd,可以在编译后的目录里找到luci-app-upnp.ipk,重新上传安装。

谢谢,按照你的办法,解决了

移动宽带数量非常庞大,移动免费送,不要白不要

你修改了100.x移动大内网的代码了吗?

#5020 (comment), 移动大内网,IPV4显示正常。DDNS,BT无线网络下载用IPV6,最快40M+,虽跑不满我的千兆移动大内网,不过一个月才20元,还要什么自行车。

IPV6 DDNS

image

BT下载速度:

image
image

请问IPV6的DDNS 需要如何设置防火墙,我设置好之后外网无法访问,但是内网可以,且DDNS并不能自动更新IP(后面通过脚本定时重启ddns解决了)

在5.4内核下编译的x86_64平台20170421版本miniupnpd,已自己替换过测试,迅雷等可以正常激活 upnp.
下载地址:https://github.com/DanielChen008/miniupnpd2017/releases/tag/20170421
包含luci安装文件

谢谢,实测确实可以了

移动宽带数量非常庞大,移动免费送,不要白不要

你修改了100.x移动大内网的代码了吗?

#5020 (comment), 移动大内网,IPV4显示正常。DDNS,BT无线网络下载用IPV6,最快40M+,虽跑不满我的千兆移动大内网,不过一个月才20元,还要什么自行车。
IPV6 DDNS
image
BT下载速度:
image
image

请问IPV6的DDNS 需要如何设置防火墙,我设置好之后外网无法访问,但是内网可以,且DDNS并不能自动更新IP(后面通过脚本定时重启ddns解决了)

防火墙打开80端口就好了。IPV6是不封80端口的,IPV4就需要端口转发了,因为IPV4一定封80端口。

移动宽带数量非常庞大,移动免费送,不要白不要

你修改了100.x移动大内网的代码了吗?

#5020 (comment), 移动大内网,IPV4显示正常。DDNS,BT无线网络下载用IPV6,最快40M+,虽跑不满我的千兆移动大内网,不过一个月才20元,还要什么自行车。
IPV6 DDNS
image
BT下载速度:
image
image

请问IPV6的DDNS 需要如何设置防火墙,我设置好之后外网无法访问,但是内网可以,且DDNS并不能自动更新IP(后面通过脚本定时重启ddns解决了)

防火墙打开80端口就好了。IPV6是不封80端口的,IPV4就需要端口转发了,因为IPV4一定封80端口。

我开放了所有的IPV6端口但是外网依然不能通过域名访问路由器上的FTP服务器

可以close了,lean大已经修复了

Was this page helpful?
0 / 5 - 0 ratings