问题原文
原帖链接 · ccamacho · CC BY-SA 3.0
I have the following scenario:
- Host A: Mi machine
- Host B: Server - 192.168.1.1
- Host C: Hop node - 192.168.2.1
- Network N: 192.168.3.0/24
Using sshuttle what's the best way to forward and be able to reach machines of network N (192.168.3.0/24) from Machine A, passing thru B and C?
I can actually run:
sshuttle -r [email omitted] -v 192.168.3.0/24 &
ssh [email omitted]
sshuttle -r root@$192.168.2.1 -v 192.168.3.0/24 &
If I open in the browser for example http://192.168.3.5 from Machine A I'm receiving the TCP packages in the destination node, but not getting routed correctly the answer.
已采纳解答
原帖链接 · Jakuje · CC BY-SA 3.0
Use ProxyCommand like for every other multi-hop setup. Create a file ~/.ssh/config with
Host B
Hostname 192.168.1.1
User root
Host C
Hostname 192.168.2.1
User root
ProxyCommand ssh -W %h:%p B
Then just connect using sshuttle:
sshuttle -r C -v 192.168.3.0/24 &
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
