`

保存一个自己使用的VPN配置参考信息

阅读更多

如题

 

是我自己用的东东,附件有密码,各位看官不要问我要密码。

 

 

 

=================================

使用SSH tunnel连接OpenVPN

 

其实很折腾人的东西,本来使用OpenVPN就是为了X墙,而有SSH就已经可以X墙了,现在用SSH连接OpenVPN,就真是吃饱了撑的……

不过还是说一下方法吧。

1、Modify the server vpn configuration file by adding proto tcp-server

2、Start the VPN server

3、Modify the client by changing the first line to remote localhost and adding the line proto tcp-client

4、Tunnel your local port 1194 (what OpenVPN uses) to 1194 on the machine you want to access – via the web server hosting the SSH daemon: 

ssh -L1194:vpnserver:1194 user@webserver

5、Start the VPN client

 

原文是http://www.classy.dk/hacks/archives/002287.html。

 

这里按照上面所说的方法重新讲解一下:

1、首先,在你的VPN配置文件里,把“remote VPN服务器 端口”这样的行去掉,替换为“remote localhost”。

2、然后,打开SSH,使用命令:plink -P SSH端口 -L 1194:VPN地址:VPN端口 -pw 密码 -N 用户名@SSH地址。“L”参数的意思是,把远程端口映射到本地端口。

3、最后,启动OpenVPN客户端。

PS:如果想连接被X的OpenVPN服务器,建议不要用这种方法,用个Socks代理或者HTTP代理连接会更好。

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics