VPS 端口转发

Linux VPS 支持
头像
oneleaf
论坛管理员
帖子: 10441
注册时间: 2005-03-27 0:06
系统: Ubuntu 12.04

VPS 端口转发

#1

帖子 oneleaf » 2010-03-12 15:41

Windows:
putty_ssh.png
putty_ssh.png (7.27 KiB) 查看 6692 次
在Putty的登录设置中配置tunnel,目标设置为Dynamic,添加一个端口7070,再按Add,然后正常登录。

Linux:

ssh -v -CNgD 7070 root@vps_ip_address

然后在浏览器上设置socks代理为 127.0.0.1:7070
头像
hasee.wu
帖子: 2089
注册时间: 2009-10-20 21:13
来自: Pacific Western University

Re: VPS 端口转发

#2

帖子 hasee.wu » 2010-03-12 15:47

前排顶帖
luke
帖子: 8
注册时间: 2006-12-31 19:03

Re: VPS 端口转发

#3

帖子 luke » 2010-03-12 22:07

服务器端需要设置什么东西吗?
头像
oneleaf
论坛管理员
帖子: 10441
注册时间: 2005-03-27 0:06
系统: Ubuntu 12.04

Re: VPS 端口转发

#4

帖子 oneleaf » 2010-03-12 23:01

luke 写了:服务器端需要设置什么东西吗?
不需要。
hlhao9527
帖子: 16
注册时间: 2009-05-01 20:38

Re: VPS 端口转发

#5

帖子 hlhao9527 » 2010-03-19 21:05

谢谢楼主终于翻墙了,可惜要是能发格openvpn的就好了,俺主要是xbox翻墙下游戏
tedasnow
帖子: 3
注册时间: 2008-04-25 0:01

Re: VPS 端口转发

#6

帖子 tedasnow » 2010-04-09 22:17

不过这样为啥别的网站能上就上访问不了youtube和facebook呢?难道被限制了?
mozart0
帖子: 2
注册时间: 2010-03-30 17:08

Re: VPS 端口转发

#7

帖子 mozart0 » 2010-04-10 11:07

tedasnow 写了:不过这样为啥别的网站能上就上访问不了youtube和facebook呢?难道被限制了?
dns污染了. socks4的dns解析是在本地进行的, socks5在远端
我用chrome + switchy插件, 代理类型选socks 5
tedasnow
帖子: 3
注册时间: 2008-04-25 0:01

Re: VPS 端口转发

#8

帖子 tedasnow » 2010-04-10 15:04

mozart0 写了:
tedasnow 写了:不过这样为啥别的网站能上就上访问不了youtube和facebook呢?难道被限制了?
dns污染了. socks4的dns解析是在本地进行的, socks5在远端
我用chrome + switchy插件, 代理类型选socks 5
原来是DNS污染在捣乱,我用的系统是XP 浏览器用的是IE8
我原来一直以为用了socks5 DNS就在远端解析了,今天经过你的提醒我抓包看了一下才发现还是本地解析
我不知道在IE在哪里能设置
反正我改用 firefox 把设置network.proxy.socks_remote_dns调为true 就一切正常了

谢谢 十分感谢
Bill Lee
帖子: 598
注册时间: 2009-09-19 20:50

Re: VPS 端口转发

#9

帖子 Bill Lee » 2010-05-06 21:27

IE 只能用 http 代理协议,没办法直接远程解析
只能在本地装个 \P\r\i\v\o\x\y 把 socks5 转换成 http 代理

\\悲哀呀,连这个都 is \b\a\n\n\e\d
aMule 2.3.1 is coming...
真正动态的 amule-dlp is coming...
本人帐号在2011年1月被盗,在2011年1月3日17:19到2010年1月6日13:34之间本帐号发的一切帖子、短信等与本人无关!
amule-dlp 开发动态
amule-dlp on Google Code
WebArchiver - 基于 wget 的网页归档工具(PyQt4 GUI 前端)
Linux 2.6.34 编译笔记
头像
男菜鸟
帖子: 1365
注册时间: 2008-12-16 14:01
来自: 漂在江湖

Re: VPS 端口转发

#10

帖子 男菜鸟 » 2010-05-18 10:09

mark
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

Re: VPS 端口转发

#11

帖子 eexpress » 2010-05-18 10:17

-CNgD why
i support -qTfnNv

complex parameter..
● 鸣学
头像
hellojinjie
帖子: 1150
注册时间: 2007-09-14 21:03
来自: 浙江

Re: VPS 端口转发

#12

帖子 hellojinjie » 2010-05-18 10:28

ssh 这边的参数有点复杂
Say hello to everyday!
头像
hcym
帖子: 15634
注册时间: 2007-05-06 2:46

Re: VPS 端口转发

#13

帖子 hcym » 2010-05-18 10:43

端口转发转发
:em11
eyeglasses
帖子: 3
注册时间: 2010-10-09 11:09

Re: VPS 端口转发

#14

帖子 eyeglasses » 2010-10-09 20:23

我的vps按照以上设置不能上网。我也不知道错在哪里,用的ie浏览器。

root@191381:~# ssh -v CNgD 7070 root@66.197.227.174
OpenSSH_5.3p1 Debian-3ubuntu3, OpenSSL 0.9.8k 25 Mar 2009
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to CNgD [115.124.17.136] port 22.
debug1: connect to address 115.124.17.136 port 22: Connection timed out
ssh: connect to host CNgD port 22: Connection timed out
root@191381:~# ssh -v -CNgD 7070 root@66.197.227.174
OpenSSH_5.3p1 Debian-3ubuntu3, OpenSSL 0.9.8k 25 Mar 2009
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 66.197.227.174 [66.197.227.174] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/identity type -1
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3p1 Debian-3ubuntu3
debug1: match: OpenSSH_5.3p1 Debian-3ubuntu3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.3p1 Debian-3ubuntu3
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 zlib@openssh.com
debug1: kex: client->server aes128-ctr hmac-md5 zlib@openssh.com
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '66.197.227.174' is known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/identity
debug1: Trying private key: /root/.ssh/id_rsa
debug1: Trying private key: /root/.ssh/id_dsa
debug1: Next authentication method: password
root@66.197.227.174's password:
debug1: Enabling compression at level 6.
debug1: Authentication succeeded (password).
debug1: Local connections to *:7070 forwarded to remote address socks:0
debug1: Local forwarding listening on 0.0.0.0 port 7070.
bind: Address already in use
debug1: Local forwarding listening on :: port 7070.
bind: Address already in use
channel_setup_fwd_listener: cannot listen to port: 7070
Could not request local forwarding.
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.

服务器设置应该是正确的吧。
头像
oneleaf
论坛管理员
帖子: 10441
注册时间: 2005-03-27 0:06
系统: Ubuntu 12.04

Re: VPS 端口转发

#15

帖子 oneleaf » 2010-10-09 20:39

:em01
设置如下图,但如果使用IE,应该是windows环境,也就是不可能使用ssh来连接,应该是使用putty来连接,你的ssh不会实在虚拟机上跑的吧?
附件
b.jpg
回复