|
本帖最后由 NghDYq 于 2024-4-6 19:08 编辑
目前最新版本的miniupnpd-2.3.6,在没有检测到公网ip的情况下会拒绝注册转发。
这是非常合理的,毕竟在nat后面,就算成功注册也只有自我安慰的效果。不如直接拒绝。
除非是nat1(fullcone),nat1允许外部网络中的任何主机通过已建立的映射直接与内部网络中的主机通信,而不需要事先在内部网络中主动与外部网络通信。
其实miniupnpd中提供了此选项,允许用户使用stun服务器来完成端口映射。
在一台处于nat1环境下的路由器下进行测试
不使用stun的情况下,miniupnpd会直接拒绝映射。
- daemon.notice miniupnpd: private/reserved address * is not suitable for external IP
- ---
- UPnP/NAT-PMP 端口映射失败。消息:“could not map port using UPnP: Action Failed”
- UPnP/NAT-PMP 端口映射失败。消息:“could not map port using UPnP: Action Failed”
- UPnP/NAT-PMP 端口映射失败。消息:“could not map port using NAT-PMP: no resources”
- UPnP/NAT-PMP 端口映射失败。消息:“could not map port using NAT-PMP: no resources”
复制代码 打开stun,则可以正常映射。
- daemon.notice miniupnpd: STUN: ext interface eth1 with IP address * is now behind unrestricted full-cone NAT 1:1 with public IP address * and firewall does not block incoming connections set by miniupnpd
- daemon.notice miniupnpd: Port forwarding is now enabled
- ---
- UPnP/NAT-PMP 端口映射成功。消息:“successfully mapped port using UPnP. external port: UDP/4321”
- UPnP/NAT-PMP 端口映射成功。消息:“successfully mapped port using UPnP. external port: TCP/4321”
复制代码
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
×
|