【发布时间】:2021-10-28 23:30:46
【问题描述】:
我有 1 个客户端(Windows 操作系统)和 4 个 VPS(Linux 操作系统)。
我想创建带有 ssh 隧道的 Socks v5 代理,用于将客户端连接到 VPS-4。
客户端 -> VPS-1 -> VPS-2 -> VPS-3 -> VPS-4 -> 互联网
在使用 CMD 的客户端中,我使用命令连接到 VPS-1:
ssh -L9999:localhost:9999 root@VPS-1-IPaddress
在 VPS-1 ssh 窗口内:为了将 VPS-1 连接到 VPS-2,我使用命令
ssh -Dlocalhost:9999 root@VPS-2-IPaddress
在 VPS-2 ssh 窗口内:为了将 VPS-2 连接到 VPS-3,我使用命令
ssh -Dlocalhost:9999 root@VPS-3-IPaddress
在 VPS-3 ssh 窗口内:为了将 VPS-3 连接到 VPS-4,我使用命令
ssh -Dlocalhost:9999 root@VPS-4-IPaddress
当我在浏览器代理设置中设置“localhost”和端口“9999”并打开网站whatismyipaddress 我看到了 VPS-2 IP 地址。
我必须看到 VPS-4 IP 地址。我不知道是什么问题。
谁能给我建议?
【问题讨论】:
标签: ssh proxy ssh-tunnel socks tunnel