V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
OpenWrt 是一个专门面向嵌入式设备的 Linux 发行版。你可以将 OpenWrt 支持的型号的嵌入式设备,比如各种路由器上的系统,换成一个有更多可能性可以折腾的 Linux 系统。
OpenWrt 官方网站
luofeiyu
V2EX  ›  OpenWrt

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

  •  
  •   luofeiyu · Jun 2, 2016 · 1533 views
    This topic created in 3626 days ago, the information mentioned may be changed or developed.
    每次我都是用这个命令在本机上建立一个到 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 replies    2022-09-15 22:05:39 +08:00
    luofeiyu
        1
    luofeiyu  
    OP
       Jun 2, 2016
    <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
       Jun 2, 2016
    `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
       Jun 2, 2016
    v2ex 的 markdown 语法究竟是什么?
    V1Eerie
        4
    V1Eerie  
       Sep 15, 2022 via Android
    OpenWRT 上的 Dropbear 不支持动态端口转发
    想要实现的话可以参考这个
    https://ichon.me/post/879.html
    V1Eerie
        5
    V1Eerie  
       Sep 15, 2022
    补充一下,这个教程也不错
    https://blog.5istar.net/archives/491
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3650 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 10:42 · PVG 18:42 · LAX 03:42 · JFK 06:42
    ♥ Do have faith in what you're doing.