惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
Stack Overflow Blog
Stack Overflow Blog
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
T
The Blog of Author Tim Ferriss
博客园 - 叶小钗
N
Netflix TechBlog - Medium
腾讯CDC
C
Check Point Blog
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
S
SegmentFault 最新的问题
F
Fortinet All Blogs
美团技术团队
U
Unit 42
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 司徒正美
F
Full Disclosure
Recorded Future
Recorded Future
D
DataBreaches.Net
博客园 - 【当耐特】
Martin Fowler
Martin Fowler
J
Java Code Geeks
I
InfoQ
Y
Y Combinator Blog
A
About on SuperTechFans
AI
AI
爱范儿
爱范儿
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Forbes - Security
Forbes - Security
W
WeLiveSecurity
M
MIT News - Artificial intelligence
雷峰网
雷峰网
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Simon Willison's Weblog
Simon Willison's Weblog
Schneier on Security
Schneier on Security
The GitHub Blog
The GitHub Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
aimingoo的专栏
aimingoo的专栏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
Latest news
Latest news
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
D
Docker
Recent Commits to openclaw:main
Recent Commits to openclaw:main
量子位
V2EX - 技术
V2EX - 技术
Project Zero
Project Zero

羽毛の家

百樂滿回水器PH-2568EFF添加到HASS – 羽毛の家 百樂滿回水器PH-2568EFF添加到HASS – 羽毛の家 EC20模塊獲取設置IMEI – 羽毛の家 EC20模塊獲取設置IMEI – 羽毛の家 OpenWRT PPPoE重連之後無網絡的解決 – 羽毛の家 OpenWRT PPPoE重連之後無網絡的解決 – 羽毛の家 Ubuntu Use An Entire Disk And Set Up LVM 空間沒使用全的解決方案 – 羽毛の家 Ubuntu Use An Entire Disk And Set Up LVM 空間沒使用全的解決方案 – 羽毛の家 OpenWRT部署SpeedTest-X供測速使用 – 羽毛の家 OpenWRT部署SpeedTest-X供測速使用 – 羽毛の家 微信開發者工具小程序真機調試提示房間已在調試中 – 羽毛の家 微信開發者工具小程序真機調試提示房間已在調試中 – 羽毛の家 OpenWRT下使用藍牙共享網絡 – 羽毛の家 OpenWRT下使用藍牙共享網絡 – 羽毛の家 移遠RM500Q-GL在NSA組網下鎖5G – 羽毛の家 移遠RM500Q-GL在NSA組網下鎖5G – 羽毛の家 OpenWRT多網關情況下MiniUpnpd添加映射失敗501 – 羽毛の家 OpenWRT多WAN情況下 數據包哪裏進哪裏出 – 羽毛の家 OpenWRT多WAN情況下 數據包哪裏進哪裏出 – 羽毛の家
OpenWRT多網關情況下MiniUpnpd添加映射失敗501 – 羽毛の家
yumao · 2020-07-05 · via 羽毛の家

Welcome to Yumao′s Blog.

OpenWRT多網關情況下MiniUpnpd添加映射失敗501

, 2020年07月05日 , Linux , 评论 在〈OpenWRT多網關情況下MiniUpnpd添加映射失敗501〉中留言功能已關閉 ,

更新了OpenWTR1907之後發生的靈異事件
upnpd無法自動添加映射
查詢詳細日志後發現返回內容

Sun Jul  5 08:41:59 2020 daemon.info miniupnpd[7417]: HTTP REQUEST from [::ffff:172.20.20.249]:36975 : POST /ctl/CmnIfCfg (HTTP/1.1)
Sun Jul  5 08:41:59 2020 daemon.debug miniupnpd[7417]: Host: 172.20.20.254:5000
Sun Jul  5 08:41:59 2020 daemon.info miniupnpd[7417]: SOAPAction: urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1#GetCommonLinkProperties
Sun Jul  5 08:41:59 2020 daemon.info miniupnpd[7417]: HTTP REQUEST from [::ffff:172.20.20.249]:36976 : POST /ctl/IPConn (HTTP/1.1)
Sun Jul  5 08:41:59 2020 daemon.debug miniupnpd[7417]: Host: 172.20.20.254:5000
Sun Jul  5 08:41:59 2020 daemon.info miniupnpd[7417]: SOAPAction: urn:schemas-upnp-org:service:WANIPConnection:2#GetExternalIPAddress
Sun Jul  5 08:41:59 2020 daemon.err miniupnpd[7417]: Failed to get ip address for interface
Sun Jul  5 08:41:59 2020 daemon.info miniupnpd[7417]: Returning UPnPError 501: Action Failed


翻找OpenWRT論壇發現有人有同樣情況發生
大概會發生在多網關多越點的情況下
MiniUpnpd會啓動的時候掃描所有的網關
然後如果不指定網關的網卡或者網關地址的話
掃描錯誤的網關就會導致映射添加失敗

那麽就查詢下/etc/init.d/miniupnpd看看是怎麽掃描的

        echo "ext_ifname=$ifname"
        echo "ext_ifname6=$ifname6"
        [ -n "$external_ip" ] && echo "ext_ip=$external_ip"
        //...
        if [ -n "$external_iface" ] ; then
                network_get_device ifname "$external_iface"
        else
                if [ -n "$external_zone" ] ; then
                        ifname=$(fw3 -q zone "$external_zone" 2>/dev/null | head -1)
                else
                        network_find_wan external_iface && \
                                network_get_device ifname "$external_iface"
                fi
        fi

那就簡單了
直接設置外網網卡或者IP即可

// 綁定外網網卡
uci set upnpd.config.external_iface='wan'
uci set upnpd.config.external_iface6='wan'
// 或者綁定外網IP
uci set upnpd.config.external_ip='115.219.145.0'
uci commit
/etc/init.d/miniupnpd restart