路由器下电脑为实现互联网端到端的连接需要配置DNAT(端口映射),UPNP就相当于自动化DNAT的实现,路由和客户端软件都需支持UPNP。

Openwrt路由下安装UPNP服务:#https://www.haiyun.me

opkg update

opkg install miniupnpd

配置Iptables UPNP链,用于发现UPNP后在此链自动添加端口映射。#允许特定转发

iptables -N MINIUPNPD

iptables -I FORWARD -i pppoe-wan -o br-lan -j MINIUPNPD

#DNAT端口映射

iptables -t nat -N MINIUPNPD

iptables -t nat -I PREROUTING -i pppoe-wan -j MINIUPNPD

UPNP配置文件:cat /var/etc/miniupnpd.conf

#https://www.haiyun.me

ext_ifname=pppoe-wan

listening_ip=192.168.1.1

port=5000

enable_natpmp=yes

enable_upnp=yes

secure_mode=yes

system_uptime=yes

bitrate_down=28672000

bitrate_up=2867200

uuid=a107991c-8b19-4ce4-a525-36bd2c814165

allow 1024-65535 0.0.0.0/0 1024-65535

deny 0-65535 0.0.0.0/0 0-65535

开启UPNP服务:/etc/init.d/miniupnpd enable

/etc/init.d/miniupnpd start

使用迅雷开启UPNP测试,查看日志UPNP服务已为迅雷添加端口映射:Sep 7 19:06:01 OpenWrt daemon.info miniupnpd[7232]: HTTP connection from 192.168.1.16:45067

Sep 7 19:06:01 OpenWrt daemon.info miniupnpd[7232]: HTTP REQUEST : POST /ctl/IPConn (HTTP/1.1)

Sep 7 19:06:01 OpenWrt daemon.info miniupnpd[7232]: SOAPAction: urn:schemas-upnp-org:service:WANIPConnection:1#AddPortMapping

Sep 7 19:06:01 OpenWrt daemon.info miniupnpd[7232]: AddPortMapping: ext port 65379 to 192.168.1.16:65379 protocol TCP for: Thunder5

Sep 7 19:06:01 OpenWrt daemon.debug miniupnpd[7232]: UPnP permission rule 0 matched : port mapping accepted

Sep 7 19:06:01 OpenWrt daemon.info miniupnpd[7232]: redirecting port 65379 to 192.168.1.16:65379 protocol TCP for: Thunder5

Sep 7 19:06:01 OpenWrt daemon.info miniupnpd[7232]: HTTP connection from 192.168.1.16:45068

Sep 7 19:06:01 OpenWrt daemon.info miniupnpd[7232]: HTTP REQUEST : POST /ctl/IPConn (HTTP/1.1)

Sep 7 19:06:01 OpenWrt daemon.info miniupnpd[7232]: SOAPAction: urn:schemas-upnp-org:service:WANIPConnection:1#AddPortMapping

Sep 7 19:06:01 OpenWrt daemon.info miniupnpd[7232]: AddPortMapping: ext port 65379 to 192.168.1.16:15301 protocol UDP for: Thunder5

Sep 7 19:06:01 OpenWrt daemon.debug miniupnpd[7232]: UPnP permission rule 0 matched : port mapping accepted

Sep 7 19:06:01 OpenWrt daemon.info miniupnpd[7232]: redirecting port 65379 to 192.168.1.16:15301 protocol UDP for: Thunder5

查看Iptables链UPNP添加的规则:iptables -L MINIUPNPD -nv

Chain MINIUPNPD (1 references)

pkts bytes target prot opt in out source destination

26245 18M ACCEPT tcp -- * * 0.0.0.0/0 192.168.1.16 tcp dpt:65379

18182 4423K ACCEPT udp -- * * 0.0.0.0/0 192.168.1.16 udp dpt:15301iptables -t nat -L MINIUPNPD -nv

Chain MINIUPNPD (1 references)

pkts bytes target prot opt in out source destination

676 61598 DNAT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:65379 to:192.168.1.16:65379

316 22320 DNAT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:65379 to:192.168.1.16:15301

linux 路由配置工具下载,Linux/Openwrt路由安装配置UPNP服务提高迅雷下载速度相关推荐

  1. Linux/Openwrt路由安装配置UPNP服务提高迅雷下载速度

    Linux/Openwrt路由安装配置UPNP服务提高迅雷下载速度 发布时间:September 7, 2012 // 分类:OpenWrt // 1 Comment 路由器下电脑为实现互联网端到端的 ...

  2. linux 文件可视化工具下载,linux下sqlite3可视化工具

    eclipse 粘贴字符串自动添加转义符 eclipse -> Window -> Preferences -> Java -> Editor -> Typing -&g ...

  3. linux usb修复工具下载,Linux助手:Universal USB Installer新版下载

    Linux系统虽然很小众化,但是安装系统并不麻烦,借助一款U盘或者闪存卡都可行.例如这次IT之家带来的Universal USB Installer,1MB的体积,近期迎来了最新版1.9.4.9. U ...

  4. linux程序分析工具下载,linux 程序分析工具

    http://blog.csdn.net/denny_233/article/details/7477282 2012 linux程序分析工具介绍(一)--"/proc" 写在最前 ...

  5. linux 软件部署工具下载,linux配置 yum管理应用软件 、 快速部署Web/FTP

    一.配置软件仓库 1.yum简介 基于rpm软件包的安装部署机制 自动解决软件包的依赖关系 需要先配置软件仓库 2.配置本地的软件仓库 a.放入centos7.iso镜像文件到光驱中,确保电源开启 b ...

  6. linux机启动 工具下载,Linux liveusb creator(u盘启动盘制作工具) 2019电脑版v3.12.0

    liveusb creator可以帮助用户进行跨平台的U盘启动制作,支持Linux和Windows系统,而且使用起来非常简单,软件也很小,快来下载一个吧. liveusb creator软件介绍 li ...

  7. linux的screen工具下载,Linux终端下的强大工具 - screen

    使用telnet或SSH远程登录linux时,如果连接非正常中断,重新连接时,系统将开一个新的session,无法恢复原来的session.screen命令可以解决这个问题. Screen工具是一个终 ...

  8. Linux 开发环境工具 下载网址大全

    Linux 开发环境工具 下载网址大全  package:        download from: 软件集成开发环境(代码编辑.浏览.编译.调试) Emacs            http:// ...

  9. Linux 开发环境工具 下载网址大全 --转

    Linux 开发环境工具 下载网址大全 --转 ARM综合2010-08-04 22:46:17阅读329评论0字号:大中小订阅 软件集成开发环境(代码编辑.浏览.编译.调试) Emacs http: ...

  10. Linux 研发环境工具 下载网址大全

    //##本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/48325/showart_433529.html Linux 研发环境工具 下载网 ...

最新文章

  1. 一个很适合用来套用后台的框架
  2. 绘制电路图风格的纠结
  3. javascript黑魔法
  4. animiz动画制作软件_实用动画制作软件分享——万彩动画大师
  5. Java获取List泛型的真实类型
  6. 20170125小测
  7. linux下后台启动springboot项目
  8. typescript设置默认值_TypeScript输入参数的默认值一例,以及对应生成的JavaScript代码分析...
  9. Pentium Pro架构/流水线及其优化 (3) - 指令流水线/乱序执行核/高速缓存/分支预测/指令预取
  10. 抢人竞争激烈,为保障iPhone需求,富士康为新员工提供万元奖金
  11. ==、Equals 、ReferenceEquals它们的异同
  12. GNS3 2.1.9版本的安装
  13. SketchUp 更新插件,不用重启让更新生效
  14. 433MHz无线通信
  15. 基于MATLAB的分子相互作用的表征模型
  16. SQL中over用法大全
  17. 教你快速缩小多个横屏短视频画面的两种方法
  18. 吴裕雄--天生自然 高等数学学习:斯托克斯公式、环流量与旋度
  19. max3490esa_MAX4524EUB_美信MAXIM半导体代理就找宇航
  20. 学计算机的多大笔记本合适,笔记本i3,i5怎么选?有多大区别?

热门文章

  1. 程序员的必备装备——为健康加油
  2. HCIP2------BGP1
  3. Android集成Sentry
  4. ORB_SLAM2编译build_ros.sh时报错([rosbuild] Error from directory check: /opt/ros/kinetic/share)
  5. 在线免费caj转Word,不用安装软件
  6. 计算机网络和internet选项,大师为你详解win10系统设置Internet选项的处理
  7. Scratch(三十八):八大行星
  8. Scrum板与Kanban如何抉择?敏捷工具:SHSYdsjgyadtgad
  9. 硅基生命之漫谈-1:天马行空
  10. 概率论与数理统计学习笔记(5)——极大似然估计