找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 3061|回复: 6

使用socat让极路由起死回生 公网ipv6转发内网ipv6

[复制链接]
发表于 2021-12-7 22:28 | 显示全部楼层 |阅读模式
家里面是一台老的极路由B51(我并没有在官网找到这个型号),也不想刷系统。但是又想搞公网ipv6到内网ipv6

先直接上答案:

针对极路由的内核版本,要从这儿下载一个socat才能安装
https://archive.openwrt.org/barr ... ckages/oldpackages/

安装指令很简单 opkg install 路径/socat_1.7.2.1-1_ramips_24kec.ipk 就完事了

然后
socat TCP6-LISTEN:19999,ipv6-v6only=1,reuseaddr,fork TCP6:[内网本机ipv6地址]:19999
socat UDP6-LISTEN:19999,ipv6-v6only=1,reuseaddr,fork UDP6:[内网本机ipv6地址]:19999


ipv6-v6only=1 参数 意思是监听IPv6的同时不占用IPv4相同端口
瞬间搞定~~~~



过程:

但是看了一下CPU型号
  1. root@Hiwifi:/www/cgi-bin# cat /proc/cpuinfo
  2. system type             : Mediatek MT7620A ver:2, eco:6
  3. machine                 : HiWiFi Wireless R32 Board
  4. processor               : 0
  5. cpu model               : MIPS 24KEc V5.0
  6. BogoMIPS                : 385.84
  7. wait instruction        : yes
  8. microsecond timers      : yes
  9. tlb_entries             : 32
  10. extra interrupt vector  : yes
  11. hardware watchpoint     : yes, count: 4, address/irw mask: [0x0ff8, 0x0ff8, 0x0ff8, 0x0ff8]
  12. isa                     : mips1 mips2 mips32r1 mips32r2
  13. ASEs implemented        : mips16 dsp
  14. shadow register sets    : 1
  15. kscratch registers      : 0
  16. core                    : 0
  17. VCED exceptions         : not available
  18. VCEI exceptions         : not available
复制代码
因为极路由的opkg资源服务器已经挂掉,所以不好用opkg来在线安装,然后又不确定版本型号。

于是想通过端口转发,结果openwrt的firewall不支持ipv6的端口转发

然后又尝试自己配置ip6tables,反正也没搞定。

于是折腾准备安装kmod-ipt-nat6,从这个库下了一个包 https://archive.openwrt.org/barr ... -1_ramips_24kec.ipk

但是又遇见安装架构问题,于是改/etc/opkg.conf 以及 /etc/opkg.d/ 各个 .conf,添加一行
极路由是
  1. arch mtmips_24kec 10
  2. arch ralink 20
  3. arch mtmips_24kec 20
  4. arch mtmips_1004kc 20
复制代码


需要新添加一个openwrt的架构名称进去
  1. arch ramips_24kec 3
复制代码


但是~~~~然并卵~~~
因为编译的系统内核版本不同,所以~~~我操,现在极路由没有可以用的nat6包了。

  1. root@Hiwifi:~# opkg install kmod-ipt-nat6_3.10.49-1_ramips_24kec.ipk
  2. Installing kmod-ipt-nat6 (3.10.49-1) to root...
  3. Collected errors:
  4. * satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-                                                                                                                                                             ipt-nat6:
  5. *      kernel (= 3.10.49-1-3df3ab26a49a04478a9633bf83827ca3) *
  6. * opkg_install_cmd: Cannot install package kmod-ipt-nat6.
复制代码


好在天无绝人之路,想了一下,可以搞个Socat~~~

完美分分钟解决问题。





我的恩山、我的无线 The best wifi forum is right here.
发表于 2021-12-12 15:19 | 显示全部楼层
真是6啊

点评

后来买了个红米AX3000,啥都不需要,直接固定ipv6到每一台设备。  详情 回复 发表于 2021-12-19 20:24
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2021-12-19 20:24 | 显示全部楼层

后来买了个红米AX3000,啥都不需要,直接固定ipv6到每一台设备。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2021-12-28 17:04 | 显示全部楼层
mark~~~~
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-8-10 08:59 | 显示全部楼层
socat无法转发udp.奇怪了

点评

这个可以的,我试过转发n2n昵  详情 回复 发表于 2022-8-10 09:00
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-8-10 09:00 | 显示全部楼层
cool 发表于 2022-8-10 08:59
socat无法转发udp.奇怪了

这个可以的,我试过转发n2n昵
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-8-10 09:04 | 显示全部楼层
V6了,,为嘛还要转发,没有PD?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-20 01:00

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表