English 中文(简体)
SOCKS 代理转发
原标题:SOCKS proxy forwarding
  • 时间:2012-05-23 14:43:42
  •  标签:
  • ssh
  • socks

Here is the configuration I have: 3 PCs : PC-1, PC-2, PC-3

Here is what I did initially: Set up a SOCKS proxy on PC-1 forwarded to PC-2 using ssh:

PC-1$ ssh -ND 1080 PC-2

我配置了浏览器以使用 127.0.0.1: 1080 和一切正常。 现在我要通过 PC-2 将所有连接转发到 PC-3 。 类似 :

PC-1$ ssh -ND 1080 PC-2
PC-2$ ssh -ND 1080 PC-3

我怎样才能做到这一点?

最佳回答

在 PC-2 上创建 SOCKS 代理服务器, 并将端口转发到 PC-1 如下:

PC-2$ ssh -ND 1080 PC-3
PC-1$ ssh -NL 1080:localhost:1080 PC-2

配置 PC-1 上的浏览器, 使用 < code> 127.0.0.1: 1080 。

问题回答

只有一个命令有一个更现代化的变体:

PC-1$ ssh -J PC-2 -ND 1080 PC-3




相关问题
ssh issue in a loop

I have a script that connects to a server using ssh. While in a loop, it fails to connect to the second server after connecting to the first one. I guess I have to quit from that server to come back ...

Python SSH paramiko issue - ssh from inside of ssh session

import paramiko client = paramiko.SSHClient() client.load_system_host_keys() ip = 192.168.100.6 client.connect(ip, username= root , password= mima ) i, o, e = client.exec_command( apt-get install ...

Trying to get a terminal to work in Emacs

I ve been having a lot of problems with emacs and trying to get the terminal to work with: M-x term I installed cygwin and I fixed up my .emacs to include the paths: (setenv "PATH" (concat "...

How can I debug a Perl CGI script?

I inherited a legacy Perl script from an old server which is being removed. The script needs to be implemented on a new server. I ve got it on the new server. The script is pretty simple; it ...

ActionScript 3 and SSH

Is there a library for SSH in ActionScript 3? If not, I d appreciate some ideas on how to have Flash integrate with SSH. I have a Flash prototype programmed out, and my client wants to see some ...

Solving thread cleanup on paramiko

I have an automated process using paramiko and have this error: Exception in thread Thread-1 (most likely raised during interpreter shutdown) .... .... <type exceptions.AttributeError >: ...

how to use ping in a script

I want a bash script that ll do: for c in computers: do ping $c if ping is sucessfull: ssh $c check something done If I only do ssh and the computer is iresponsive, it takes forever ...

Changing username in SVN+SSH URI on the fly in working copy

I am using SVN+SSH to check out a working copy of repository from an SVN server on which all developers are members of a developer group and have full read/write permissions on the repository ...

热门标签