V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
OpenWrt 是一个专门面向嵌入式设备的 Linux 发行版。你可以将 OpenWrt 支持的型号的嵌入式设备,比如各种路由器上的系统,换成一个有更多可能性可以折腾的 Linux 系统。
OpenWrt 官方网站
luofeiyu
V2EX  ›  OpenWrt

如何将 ssh tunnel 建立在 openwrt 路由器里面?

  •  
  •   luofeiyu · 2016-06-02 08:22:50 +08:00 · 620 次点击
    这是一个创建于 2886 天前的主题,其中的信息可能已经有所发展或是发生改变。
    每次我都是用这个命令在本机上建立一个到 remote server 的隧道。

    ssh -D 127.0.0.1:1080 root@my_vps.ip

    现在,我的本机前面加了个路由器,运行 openwrt, 我想在路由器上建立这个隧道。
    ssh 登录路由器后,
    <pre><code>
    vim /etc/config/sshtunnel
    config 'tunnelL' 'server_http'
    option 'server' 'home'
    option 'remoteaddress' 'vps_ip'
    option 'remoteport' '22'
    option 'localaddress' '127.0.0.1'
    option 'localport' '1080'
    <pre></code>
    设置 firefox 插件里面的地址 192.168.1.1 (路由器的地址),
    发现,没有建立隧道,请问哪里有问题?
    5 条回复    2022-09-15 22:05:39 +08:00
    luofeiyu
        1
    luofeiyu  
    OP
       2016-06-02 08:34:06 +08:00
    <pre><code>
    vim /etc/config/sshtunnel
    config 'tunnelL' 'server_http'
    option 'server' 'home'
    option 'remoteaddress' 'vps_ip'
    option 'remoteport' '22'
    option 'localaddress' '127.0.0.1'
    option 'localport' '1080'
    </code> </pre>
    luofeiyu
        2
    luofeiyu  
    OP
       2016-06-02 08:35:06 +08:00
    `vim /etc/config/sshtunnel
    config 'tunnelL' 'server_http'
    option 'server' 'home'
    option 'remoteaddress' 'vps_ip'
    option 'remoteport' '22'
    option 'localaddress' '127.0.0.1'
    option 'localport' '1080' `
    luofeiyu
        3
    luofeiyu  
    OP
       2016-06-02 08:35:42 +08:00
    v2ex 的 markdown 语法究竟是什么?
    V1Eerie
        4
    V1Eerie  
       2022-09-15 18:46:26 +08:00 via Android
    OpenWRT 上的 Dropbear 不支持动态端口转发
    想要实现的话可以参考这个
    https://ichon.me/post/879.html
    V1Eerie
        5
    V1Eerie  
       2022-09-15 22:05:39 +08:00
    补充一下,这个教程也不错
    https://blog.5istar.net/archives/491
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2889 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 14:46 · PVG 22:46 · LAX 07:46 · JFK 10:46
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.