跳至主要內容
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?

4563博客

全新的繁體中文 WordPress 網站
  • 首頁
  • 老哥们,请教个网络问题。
未分類
13 4 月 2021

老哥们,请教个网络问题。

老哥们,请教个网络问题。

資深大佬 : sorasyl 0

现有内网机 windows 一台,linux 服务器一台,linux 能访问外网,windows 能 ssh 连接 linux

如何让 windows 连接外网?

有个关键字就可以了,谢谢

大佬有話說 (24)

  • 資深大佬 : coderfox

    – SSH tunneling: Forward a specific port (localhost:9999 to example.org:80) along with disabling pseudo-[t]ty allocation and executio[n] of remote commands:
    ssh -L 9999:example.org:80 -N -T [email protected]_host

  • 資深大佬 : coderfox

    不好意思,刚看错了,应该是这个:

    – SSH tunneling: Dynamic port forwarding (SOCKS proxy on localhost:9999):
    ssh -D 9999 -C [email protected]_host

  • 資深大佬 : Jirajine

    Linux 上开启 ip forward 、masqurade,并让防火墙放行转发包。
    然后 Windows 把默认路由指向 Linux,就可以了。

  • 資深大佬 : mgrddsj

    最简单的方法:Linux 上开个 Shadowsocks-libev,Windows 上用支持 ss 的客户端连接上就好了

  • 資深大佬 : seers

    关键字 Linux server as gateway

  • 資深大佬 : tankren

    linux 开转发 windows 把 linux 设成网关 或者 linux 跑 socks 代理
    你先确定这样做会不会被炒鱿鱼

  • 主 資深大佬 : sorasyl

    @tankren 啊这,太黑人了吧

  • 資深大佬 : catchexception

    frp ?

  • 主 資深大佬 : sorasyl

    感谢各位老哥指点
    我试了下 socks5 代理 windows 只能跑下 http,其他的应用需要单独设置代理,用 ipforwad 做转发更好

  • 資深大佬 : duole

    正向代理?

  • 資深大佬 : wangyaominde

    l2tp

  • 資深大佬 : huangmingyou

    windows ssh 到 linux 的时候,可以给 windows 做 socks5 代理。

  • 資深大佬 : nekoneko

    代理的话可以用 v2ray
    linux 上用一件脚本安装一下,然后 windows 上用 v2ray 客户端就行

    https://iyideng.me/black-technology/cgfw/vmess-v2ray-server-building-and-using-tutorial.html

  • 資深大佬 : deviluser

    windows 运行:
    ssh -ND 1080 [email protected]_ip
    开启本地 1080 端口用作 socket5 代理,流量统统以 ssh 协议通过 remote 出
    然后再配置 internet 属性添加局域网代理

    感觉是布置的作业,你应该自己做才对。

  • 資深大佬 : 3dwelcome

    你们怎么都想到设置代理,难道主没有 linux 的 root 权限?
    感觉要求就是把 linux 当成一个软路由,普通的 NAT 转发机器。

  • 資深大佬 : no1xsyzy

    @3dwelcome 主要是代理想断就断
    今天倒没有出现 “找网管、不要自己绕过限制” 派人士(

  • 資深大佬 : tankren

    @sorasyl #7 公家的内网机不要乱搞

  • 主 資深大佬 : sorasyl

    @3dwelcome 软路由更符合需求,但是服务器没有公网 ip,折腾了半天始终不能转发数据包

  • 資深大佬 : guanyin8cnq12

    socks5 就完事了阿,或者装 shadowsocks server 和 client

  • 資深大佬 : oneisall8955

    Linux iptables 开转发,window 网关设置为 Linux

  • 資深大佬 : brMu

    iptables masquerade

  • 資深大佬 : ik

    @sorasyl #18 服务器上 ip 是动态的就指定网卡,不指定 ip

  • 資深大佬 : q197

    @mgrddsj 多了一步 其实 ssh 自带转成 socks 的功能

  • 資深大佬 : smileawei

    上很多都说什么 ss v2ray
    根本没必要。
    如果 Win 和 Linux 在同一个二层网络内。那么 Linux 开 nat 和 ipforwad 。然后 Windows 把网关设置成 Linux 。关键点在开 NAT 。如果只是 forward 。出口的网络管控设备看到的请求还是你的 win 。那么依旧收到策略管控。
    如果 win 和 linux 不在一个二层网络内。可以试试 VPN 或者 socks5 。

文章導覽

上一篇文章
下一篇文章

AD

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文

51la

4563博客

全新的繁體中文 WordPress 網站
返回頂端
本站採用 WordPress 建置 | 佈景主題採用 GretaThemes 所設計的 Memory
4563博客
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?
在這裡新增小工具