CRCERIC 发表于 2007-10-13 17:52

【原创】DD WRT路由上架设openvpn-用于cmwap上网

Server mode with Static Key

一.准备工作
对DD WRT不是很熟 买来后研究了两天 发现功能很强大!我是在淘宝上买的
http://auction1.taobao.com/auctio......511f538fdd8afc6abf3a999718253a1d.jhtml
具体功能可以去看看在DD WRT上架设openvpn服务器,前提是必须刷带vpn的固件 可以在这里下载
http://www.dd-wrt.com/dd-wrtv2/downloads.php
刷固件的方法恩山论他上有详细的介绍 包括刷坏了怎么办
http://w183.s1.mydiscuz.com/forum/forumdisplay.php?fid=58&page=1
下载openvpn安装程序 带gui的版本的 这个大家都很熟了
http://openvpn.se/download.html
到www.3322.org申请一个动态域名 然后在路由器上设置 以便外网可以访问到路由器

二.申请静态证书在开始-程序-openvpn-Generate a static OpenVPN key生成静态证书 在openvpn\config目录下的key.txt 文件里
http://www.ibmnb.com/attachments/2007/10/158461_200710182015191.gif


三 在路由器的管理-诊断 下 输入

http://www.ibmnb.com/attachments/2007/10/158461_200710182015531.gif

1把下面的内容贴到文本框内 然后保存到启动命令
code
openvpn --mktun --dev tap0   brctl addif br0 tap0   
ifconfig tap0 0.0.0.0 promisc up
echo "
-----BEGIN OpenVPN Static key V1-----
注:这里粘贴刚才生成的key.txt里的内容 包括上下
-----END OpenVPN Static key V1-----   
" > /tmp/static.key   ln -s /usr/sbin/openvpn /tmp/myvpn   
/tmp/myvpn --dev tap0 --secret /tmp/static.key --comp-lzo --port 443 --proto tcp-server --verb 3 --daemon



http://www.ibmnb.com/attachments/2007/10/158461_200710182016371.gif

2 把下面的内容贴到文本框内 然后保存到防火墙命令 code

iptables -I INPUT 1 -p tcp --dport 443 -j ACCEPT
http://www.ibmnb.com/attachments/2007/10/158461_200710182017151.gif




3 禁用NTP客户端 防止因同步本地时间经常断线重播

http://www.ibmnb.com/attachments/2007/10/158461_200710182027151.gif

4在基本设置-动态DNS中填入所申请的3322.org域名 连接成功后 域名会指向路由器

http://www.ibmnb.com/attachments/2007/10/158461_200710182017441.gif

5 重启路由器 然后在诊断 文本框内输入

ps | grep vpn

检测一下vpn是否运行 一般会出现这个提示

http://www.ibmnb.com/attachments/2007/10/158461_200710182027191.gif





ok 服务端设置完成了 现在开始设置客户端了

四 在openvpn的安装目录 openvpn\config 创建一个文件 client.ovpn内容如下:

http://www.ibmnb.com/attachments/2007/10/158461_200710182015191.gif


remote ****.3322.org#输入你申请的3322的动态域名
http-proxy-retry
http-proxy 10.0.0.172 80 #联通要换成联通的网关 我只在移动上测试成功
port 443
dev tap
secret key.txt
proto tcp-client
comp-lzo
route-gateway 192.168.1.1   #需要加下面两句命令,并且.这个ip是你路由器的ip地址....
redirect-gateway                     


保存然后连接 ok了

总结 此种方法只能用于一个客户端的连接 也就是说 你家里如果有adsl的话 买个便宜的路由器就可以自己架设vpn了!

联通的mail卡目前没找到合适的合适的网关测试 那位兄弟可以pm一个可以用的网关让我测试一下

[ Edited byCRCERIC on 2008-3-23 18:29 ]

黄土高坡 发表于 2007-10-13 21:54

ppbread 发表于 2007-10-13 22:05

哈哈!终于有人写出来!加油加油

abc029 发表于 2007-10-14 10:51

CRCERIC 发表于 2007-10-14 14:41

回复 #2 黄土高坡 的帖子

呵呵 家里2m的fttp 不用浪费资源

ppbread 发表于 2007-10-18 10:03

Thu Oct 18 09:56:40 2007 OpenVPN 2.0.9 Win32-MinGW built on Oct1 2006
Thu Oct 18 09:56:40 2007 LZO compression initialized
Thu Oct 18 09:56:40 2007 TAP-WIN32 device opened: \\.\Global\{F6CEE821-AF42-4BBB-B244-7FB596418A1A}.tap
Thu Oct 18 09:56:40 2007 Successful ARP Flush on interface {F6CEE821-AF42-4BBB-B244-7FB596418A1A}
Thu Oct 18 09:56:40 2007 Attempting to establish TCP connection with 125.31.237.122:443
Thu Oct 18 09:56:40 2007 TCP connection established with 125.31.237.122:443
Thu Oct 18 09:56:40 2007 TCPv4_CLIENT link local:
Thu Oct 18 09:56:40 2007 TCPv4_CLIENT link remote: 125.31.237.122:443
Thu Oct 18 09:56:44 2007 Connection reset, restarting
Thu Oct 18 09:56:44 2007 SIGUSR1 received, process restarting
Thu Oct 18 09:56:49 2007 LZO compression initialized
Thu Oct 18 09:56:49 2007 TAP-WIN32 device opened: \\.\Global\{F6CEE821-AF42-4BBB-B244-7FB596418A1A}.tap
Thu Oct 18 09:56:49 2007 Successful ARP Flush on interface {F6CEE821-AF42-4BBB-B244-7FB596418A1A}
Thu Oct 18 09:56:49 2007 Attempting to establish TCP connection with 125.31.237.122:443
Thu Oct 18 09:56:49 2007 TCP connection established with 125.31.237.122:443
Thu Oct 18 09:56:49 2007 TCPv4_CLIENT link local:
Thu Oct 18 09:56:49 2007 TCPv4_CLIENT link remote: 125.31.237.122:443
Thu Oct 18 09:56:49 2007 Connection reset, restarting
Thu Oct 18 09:56:49 2007 SIGUSR1 received, process restarting
Thu Oct 18 09:56:54 2007 LZO compression initialized
Thu Oct 18 09:56:54 2007 TAP-WIN32 device opened: \\.\Global\{F6CEE821-AF42-4BBB-B244-7FB596418A1A}.tap
Thu Oct 18 09:56:54 2007 Successful ARP Flush on interface {F6CEE821-AF42-4BBB-B244-7FB596418A1A}
Thu Oct 18 09:56:54 2007 Attempting to establish TCP connection with 125.31.237.122:443
Thu Oct 18 09:56:54 2007 TCP connection established with 125.31.237.122:443
Thu Oct 18 09:56:54 2007 TCPv4_CLIENT link local:
Thu Oct 18 09:56:54 2007 TCPv4_CLIENT link remote: 125.31.237.122:443
Thu Oct 18 09:56:54 2007 Connection reset, restarting
Thu Oct 18 09:56:54 2007 SIGUSR1 received, process restarting
Thu Oct 18 09:56:59 2007 LZO compression initialized
Thu Oct 18 09:56:59 2007 TAP-WIN32 device opened: \\.\Global\{F6CEE821-AF42-4BBB-B244-7FB596418A1A}.tap
Thu Oct 18 09:56:59 2007 Successful ARP Flush on interface {F6CEE821-AF42-4BBB-B244-7FB596418A1A}
Thu Oct 18 09:56:59 2007 Attempting to establish TCP connection with 125.31.237.122:443
Thu Oct 18 09:56:59 2007 TCP connection established with 125.31.237.122:443
Thu Oct 18 09:56:59 2007 TCPv4_CLIENT link local:
Thu Oct 18 09:56:59 2007 TCPv4_CLIENT link remote: 125.31.237.122:443
Thu Oct 18 09:56:59 2007 Connection reset, restarting
Thu Oct 18 09:56:59 2007 SIGUSR1 received, process restarting
Thu Oct 18 09:57:04 2007 LZO compression initialized
Thu Oct 18 09:57:04 2007 TAP-WIN32 device opened: \\.\Global\{F6CEE821-AF42-4BBB-B244-7FB596418A1A}.tap
Thu Oct 18 09:57:04 2007 Successful ARP Flush on interface {F6CEE821-AF42-4BBB-B244-7FB596418A1A}
Thu Oct 18 09:57:04 2007 Attempting to establish TCP connection with 125.31.237.122:443
Thu Oct 18 09:57:04 2007 TCP connection established with 125.31.237.122:443
Thu Oct 18 09:57:04 2007 TCPv4_CLIENT link local:
Thu Oct 18 09:57:04 2007 TCPv4_CLIENT link remote: 125.31.237.122:443
Thu Oct 18 09:57:04 2007 Connection reset, restarting
Thu Oct 18 09:57:04 2007 SIGUSR1 received, process restarting
Thu Oct 18 09:57:09 2007 LZO compression initialized
Thu Oct 18 09:57:09 2007 TAP-WIN32 device opened: \\.\Global\{F6CEE821-AF42-4BBB-B244-7FB596418A1A}.tap
Thu Oct 18 09:57:09 2007 Successful ARP Flush on interface {F6CEE821-AF42-4BBB-B244-7FB596418A1A}
Thu Oct 18 09:57:09 2007 Attempting to establish TCP connection with 125.31.237.122:443
Thu Oct 18 09:57:09 2007 TCP connection established with 125.31.237.122:443
Thu Oct 18 09:57:09 2007 TCPv4_CLIENT link local:
Thu Oct 18 09:57:09 2007 TCPv4_CLIENT link remote: 125.31.237.122:443
Thu Oct 18 09:57:09 2007 Connection reset, restarting
Thu Oct 18 09:57:09 2007 SIGUSR1 received, process restarting
Thu Oct 18 09:57:14 2007 LZO compression initialized
Thu Oct 18 09:57:14 2007 TAP-WIN32 device opened: \\.\Global\{F6CEE821-AF42-4BBB-B244-7FB596418A1A}.tap
Thu Oct 18 09:57:14 2007 Successful ARP Flush on interface {F6CEE821-AF42-4BBB-B244-7FB596418A1A}
Thu Oct 18 09:57:14 2007 Attempting to establish TCP connection with 125.31.237.122:443
Thu Oct 18 09:57:14 2007 TCP connection established with 125.31.237.122:443
Thu Oct 18 09:57:14 2007 TCPv4_CLIENT link local:
Thu Oct 18 09:57:14 2007 TCPv4_CLIENT link remote: 125.31.237.122:443
Thu Oct 18 09:57:14 2007 Connection reset, restarting
Thu Oct 18 09:57:14 2007 SIGUSR1 received, process restarting
Thu Oct 18 09:57:19 2007 LZO compression initialized
Thu Oct 18 09:57:19 2007 TAP-WIN32 device opened: \\.\Global\{F6CEE821-AF42-4BBB-B244-7FB596418A1A}.tap
Thu Oct 18 09:57:19 2007 Successful ARP Flush on interface {F6CEE821-AF42-4BBB-B244-7FB596418A1A}
Thu Oct 18 09:57:19 2007 Attempting to establish TCP connection with 125.31.237.122:443
Thu Oct 18 09:57:19 2007 TCP connection established with 125.31.237.122:443
Thu Oct 18 09:57:19 2007 TCPv4_CLIENT link local:
Thu Oct 18 09:57:19 2007 TCPv4_CLIENT link remote: 125.31.237.122:443
Thu Oct 18 09:57:19 2007 Connection reset, restarting
Thu Oct 18 09:57:19 2007 SIGUSR1 received, process restarting
Thu Oct 18 09:57:24 2007 LZO compression initialized
Thu Oct 18 09:57:24 2007 TAP-WIN32 device opened: \\.\Global\{F6CEE821-AF42-4BBB-B244-7FB596418A1A}.tap
Thu Oct 18 09:57:24 2007 Successful ARP Flush on interface {F6CEE821-AF42-4BBB-B244-7FB596418A1A}
Thu Oct 18 09:57:24 2007 Attempting to establish TCP connection with 125.31.237.122:443
Thu Oct 18 09:57:24 2007 TCP connection established with 125.31.237.122:443
Thu Oct 18 09:57:24 2007 TCPv4_CLIENT link local:
Thu Oct 18 09:57:24 2007 TCPv4_CLIENT link remote: 125.31.237.122:443
Thu Oct 18 09:57:24 2007 Connection reset, restarting
Thu Oct 18 09:57:24 2007 SIGUSR1 received, process restarting
Thu Oct 18 09:57:29 2007 LZO compression initialized
Thu Oct 18 09:57:29 2007 TAP-WIN32 device opened: \\.\Global\{F6CEE821-AF42-4BBB-B244-7FB596418A1A}.tap
Thu Oct 18 09:57:29 2007 Successful ARP Flush on interface {F6CEE821-AF42-4BBB-B244-7FB596418A1A}
Thu Oct 18 09:57:29 2007 Attempting to establish TCP connection with 125.31.237.122:443
Thu Oct 18 09:57:29 2007 TCP connection established with 125.31.237.122:443
Thu Oct 18 09:57:29 2007 TCPv4_CLIENT link local:
Thu Oct 18 09:57:29 2007 TCPv4_CLIENT link remote: 125.31.237.122:443
Thu Oct 18 09:57:29 2007 Connection reset, restarting
Thu Oct 18 09:57:29 2007 SIGUSR1 received, process restarting
Thu Oct 18 09:57:34 2007 LZO compression initialized
Thu Oct 18 09:57:34 2007 TAP-WIN32 device opened: \\.\Global\{F6CEE821-AF42-4BBB-B244-7FB596418A1A}.tap
Thu Oct 18 09:57:34 2007 Successful ARP Flush on interface {F6CEE821-AF42-4BBB-B244-7FB596418A1A}
Thu Oct 18 09:57:34 2007 Attempting to establish TCP connection with 125.31.237.122:443
Thu Oct 18 09:57:34 2007 TCP connection established with 125.31.237.122:443
Thu Oct 18 09:57:34 2007 TCPv4_CLIENT link local:
Thu Oct 18 09:57:34 2007 TCPv4_CLIENT link remote: 125.31.237.122:443
Thu Oct 18 09:57:34 2007 Connection reset, restarting
Thu Oct 18 09:57:34 2007 SIGUSR1 received, process restarting
Thu Oct 18 09:57:39 2007 LZO compression initialized
Thu Oct 18 09:57:39 2007 TAP-WIN32 device opened: \\.\Global\{F6CEE821-AF42-4BBB-B244-7FB596418A1A}.tap
Thu Oct 18 09:57:39 2007 Successful ARP Flush on interface {F6CEE821-AF42-4BBB-B244-7FB596418A1A}
Thu Oct 18 09:57:39 2007 Attempting to establish TCP connection with 125.31.237.122:443
Thu Oct 18 09:57:40 2007 TCP connection established with 125.31.237.122:443
Thu Oct 18 09:57:40 2007 TCPv4_CLIENT link local:
Thu Oct 18 09:57:40 2007 TCPv4_CLIENT link remote: 125.31.237.122:443
Thu Oct 18 09:57:40 2007 Connection reset, restarting
Thu Oct 18 09:57:40 2007 SIGUSR1 received, process restarting
Thu Oct 18 09:57:45 2007 LZO compression initialized
Thu Oct 18 09:57:45 2007 TAP-WIN32 device opened: \\.\Global\{F6CEE821-AF42-4BBB-B244-7FB596418A1A}.tap
Thu Oct 18 09:57:45 2007 Successful ARP Flush on interface {F6CEE821-AF42-4BBB-B244-7FB596418A1A}
Thu Oct 18 09:57:45 2007 Attempting to establish TCP connection with 125.31.237.122:443
Thu Oct 18 09:57:45 2007 TCP connection established with 125.31.237.122:443
Thu Oct 18 09:57:45 2007 TCPv4_CLIENT link local:
Thu Oct 18 09:57:45 2007 TCPv4_CLIENT link remote: 125.31.237.122:443
Thu Oct 18 09:57:45 2007 Connection reset, restarting
Thu Oct 18 09:57:45 2007 SIGUSR1 received, process restarting
Thu Oct 18 09:57:50 2007 LZO compression initialized
Thu Oct 18 09:57:50 2007 TAP-WIN32 device opened: \\.\Global\{F6CEE821-AF42-4BBB-B244-7FB596418A1A}.tap
Thu Oct 18 09:57:50 2007 Successful ARP Flush on interface {F6CEE821-AF42-4BBB-B244-7FB596418A1A}
Thu Oct 18 09:57:50 2007 Attempting to establish TCP connection with 125.31.237.122:443
Thu Oct 18 09:57:50 2007 TCP connection established with 125.31.237.122:443
Thu Oct 18 09:57:50 2007 TCPv4_CLIENT link local:
Thu Oct 18 09:57:50 2007 TCPv4_CLIENT link remote: 125.31.237.122:443
Thu Oct 18 09:57:50 2007 Connection reset, restarting
Thu Oct 18 09:57:50 2007 SIGUSR1 received, process restarting
Thu Oct 18 09:57:55 2007 LZO compression initialized
Thu Oct 18 09:57:55 2007 TAP-WIN32 device opened: \\.\Global\{F6CEE821-AF42-4BBB-B244-7FB596418A1A}.tap
Thu Oct 18 09:57:55 2007 Successful ARP Flush on interface {F6CEE821-AF42-4BBB-B244-7FB596418A1A}
Thu Oct 18 09:57:55 2007 Attempting to establish TCP connection with 125.31.237.122:443
Thu Oct 18 09:57:55 2007 TCP connection established with 125.31.237.122:443
Thu Oct 18 09:57:55 2007 TCPv4_CLIENT link local:
Thu Oct 18 09:57:55 2007 TCPv4_CLIENT link remote: 125.31.237.122:443
Thu Oct 18 09:57:55 2007 Connection reset, restarting
Thu Oct 18 09:57:55 2007 SIGUSR1 received, process restarting
Thu Oct 18 09:58:00 2007 LZO compression initialized
Thu Oct 18 09:58:00 2007 TAP-WIN32 device opened: \\.\Global\{F6CEE821-AF42-4BBB-B244-7FB596418A1A}.tap
Thu Oct 18 09:58:00 2007 Successful ARP Flush on interface {F6CEE821-AF42-4BBB-B244-7FB596418A1A}
Thu Oct 18 09:58:00 2007 Attempting to establish TCP connection with 125.31.237.122:443
Thu Oct 18 09:58:00 2007 TCP connection established with 125.31.237.122:443
Thu Oct 18 09:58:00 2007 TCPv4_CLIENT link local:
Thu Oct 18 09:58:00 2007 TCPv4_CLIENT link remote: 125.31.237.122:443
Thu Oct 18 09:58:00 2007 Connection reset, restarting
Thu Oct 18 09:58:00 2007 SIGUSR1 received, process restarting
Thu Oct 18 09:58:05 2007 LZO compression initialized
Thu Oct 18 09:58:05 2007 TAP-WIN32 device opened: \\.\Global\{F6CEE821-AF42-4BBB-B244-7FB596418A1A}.tap
Thu Oct 18 09:58:05 2007 Successful ARP Flush on interface {F6CEE821-AF42-4BBB-B244-7FB596418A1A}
Thu Oct 18 09:58:05 2007 Attempting to establish TCP connection with 125.31.237.122:443
Thu Oct 18 09:58:05 2007 TCP connection established with 125.31.237.122:443
Thu Oct 18 09:58:05 2007 TCPv4_CLIENT link local:
Thu Oct 18 09:58:05 2007 TCPv4_CLIENT link remote: 125.31.237.122:443
Thu Oct 18 09:58:05 2007 Connection reset, restarting
Thu Oct 18 09:58:05 2007 SIGUSR1 received, process restarting
Thu Oct 18 09:58:10 2007 LZO compression initialized
Thu Oct 18 09:58:10 2007 TAP-WIN32 device opened: \\.\Global\{F6CEE821-AF42-4BBB-B244-7FB596418A1A}.tap
Thu Oct 18 09:58:10 2007 Successful ARP Flush on interface {F6CEE821-AF42-4BBB-B244-7FB596418A1A}
Thu Oct 18 09:58:10 2007 Attempting to establish TCP connection with 125.31.237.122:443
Thu Oct 18 09:58:10 2007 TCP connection established with 125.31.237.122:443
Thu Oct 18 09:58:10 2007 TCPv4_CLIENT link local:
Thu Oct 18 09:58:10 2007 TCPv4_CLIENT link remote: 125.31.237.122:443
Thu Oct 18 09:58:10 2007 Connection reset, restarting
Thu Oct 18 09:58:10 2007 SIGUSR1 received, process restarting
Thu Oct 18 09:58:15 2007 LZO compression initialized
Thu Oct 18 09:58:15 2007 TAP-WIN32 device opened: \\.\Global\{F6CEE821-AF42-4BBB-B244-7FB596418A1A}.tap
Thu Oct 18 09:58:15 2007 Successful ARP Flush on interface {F6CEE821-AF42-4BBB-B244-7FB596418A1A}
Thu Oct 18 09:58:15 2007 Attempting to establish TCP connection with 125.31.237.122:443
Thu Oct 18 09:58:15 2007 TCP connection established with 125.31.237.122:443
Thu Oct 18 09:58:15 2007 TCPv4_CLIENT link local:
Thu Oct 18 09:58:15 2007 TCPv4_CLIENT link remote: 125.31.237.122:443
Thu Oct 18 09:58:15 2007 Connection reset, restarting
Thu Oct 18 09:58:15 2007 SIGUSR1 received, process restarting
Thu Oct 18 09:58:20 2007 LZO compression initialized
Thu Oct 18 09:58:20 2007 TAP-WIN32 device opened: \\.\Global\{F6CEE821-AF42-4BBB-B244-7FB596418A1A}.tap
Thu Oct 18 09:58:20 2007 Successful ARP Flush on interface {F6CEE821-AF42-4BBB-B244-7FB596418A1A}
Thu Oct 18 09:58:20 2007 Attempting to establish TCP connection with 125.31.237.122:443
Thu Oct 18 09:58:20 2007 TCP connection established with 125.31.237.122:443
Thu Oct 18 09:58:20 2007 TCPv4_CLIENT link local:
Thu Oct 18 09:58:20 2007 TCPv4_CLIENT link remote: 125.31.237.122:443
Thu Oct 18 09:58:20 2007 Connection reset, restarting
Thu Oct 18 09:58:20 2007 SIGUSR1 received, process restarting
Thu Oct 18 09:58:25 2007 LZO compression initialized
Thu Oct 18 09:58:25 2007 TAP-WIN32 device opened: \\.\Global\{F6CEE821-AF42-4BBB-B244-7FB596418A1A}.tap
Thu Oct 18 09:58:25 2007 Successful ARP Flush on interface {F6CEE821-AF42-4BBB-B244-7FB596418A1A}
Thu Oct 18 09:58:25 2007 Attempting to establish TCP connection with 125.31.237.122:443
Thu Oct 18 09:58:25 2007 TCP connection established with 125.31.237.122:443
Thu Oct 18 09:58:25 2007 TCPv4_CLIENT link local:
Thu Oct 18 09:58:25 2007 TCPv4_CLIENT link remote: 125.31.237.122:443
Thu Oct 18 09:58:25 2007 Connection reset, restarting
Thu Oct 18 09:58:25 2007 SIGUSR1 received, process restarting
Thu Oct 18 09:58:30 2007 LZO compression initialized
Thu Oct 18 09:58:30 2007 TAP-WIN32 device opened: \\.\Global\{F6CEE821-AF42-4BBB-B244-7FB596418A1A}.tap
Thu Oct 18 09:58:30 2007 Successful ARP Flush on interface {F6CEE821-AF42-4BBB-B244-7FB596418A1A}
Thu Oct 18 09:58:30 2007 Attempting to establish TCP connection with 125.31.237.122:443
Thu Oct 18 09:58:30 2007 TCP connection established with 125.31.237.122:443
Thu Oct 18 09:58:30 2007 TCPv4_CLIENT link local:
Thu Oct 18 09:58:30 2007 TCPv4_CLIENT link remote: 125.31.237.122:443
Thu Oct 18 09:58:30 2007 Connection reset, restarting
Thu Oct 18 09:58:30 2007 SIGUSR1 received, process restarting
Thu Oct 18 09:58:35 2007 LZO compression initialized
Thu Oct 18 09:58:35 2007 TAP-WIN32 device opened: \\.\Global\{F6CEE821-AF42-4BBB-B244-7FB596418A1A}.tap
Thu Oct 18 09:58:35 2007 Successful ARP Flush on interface {F6CEE821-AF42-4BBB-B244-7FB596418A1A}
Thu Oct 18 09:58:35 2007 Attempting to establish TCP connection with 125.31.237.122:443
Thu Oct 18 09:58:35 2007 TCP connection established with 125.31.237.122:443
Thu Oct 18 09:58:35 2007 TCPv4_CLIENT link local:
Thu Oct 18 09:58:35 2007 TCPv4_CLIENT link remote: 125.31.237.122:443
Thu Oct 18 09:58:35 2007 Connection reset, restarting
Thu Oct 18 09:58:35 2007 SIGUSR1 received, process restarting
Thu Oct 18 09:58:40 2007 LZO compression initialized
Thu Oct 18 09:58:40 2007 TAP-WIN32 device opened: \\.\Global\{F6CEE821-AF42-4BBB-B244-7FB596418A1A}.tap
Thu Oct 18 09:58:40 2007 Successful ARP Flush on interface {F6CEE821-AF42-4BBB-B244-7FB596418A1A}
Thu Oct 18 09:58:40 2007 Attempting to establish TCP connection with 125.31.237.122:443
Thu Oct 18 09:58:40 2007 TCP connection established with 125.31.237.122:443
Thu Oct 18 09:58:40 2007 TCPv4_CLIENT link local:
Thu Oct 18 09:58:40 2007 TCPv4_CLIENT link remote: 125.31.237.122:443
Thu Oct 18 09:58:40 2007 Connection reset, restarting
Thu Oct 18 09:58:40 2007 SIGUSR1 received, process restarting
Thu Oct 18 09:58:45 2007 LZO compression initialized
Thu Oct 18 09:58:45 2007 TAP-WIN32 device opened: \\.\Global\{F6CEE821-AF42-4BBB-B244-7FB596418A1A}.tap
Thu Oct 18 09:58:45 2007 Successful ARP Flush on interface {F6CEE821-AF42-4BBB-B244-7FB596418A1A}
Thu Oct 18 09:58:45 2007 Attempting to establish TCP connection with 125.31.237.122:443
Thu Oct 18 09:58:45 2007 TCP connection established with 125.31.237.122:443
Thu Oct 18 09:58:45 2007 TCPv4_CLIENT link local:
Thu Oct 18 09:58:45 2007 TCPv4_CLIENT link remote: 125.31.237.122:443
Thu Oct 18 09:58:45 2007 Connection reset, restarting
Thu Oct 18 09:58:45 2007 SIGUSR1 received, process restarting
Thu Oct 18 09:58:50 2007 LZO compression initialized
Thu Oct 18 09:58:50 2007 TAP-WIN32 device opened: \\.\Global\{F6CEE821-AF42-4BBB-B244-7FB596418A1A}.tap
Thu Oct 18 09:58:50 2007 Successful ARP Flush on interface {F6CEE821-AF42-4BBB-B244-7FB596418A1A}
Thu Oct 18 09:58:50 2007 Attempting to establish TCP connection with 125.31.237.122:443
Thu Oct 18 09:58:50 2007 TCP connection established with 125.31.237.122:443
Thu Oct 18 09:58:50 2007 TCPv4_CLIENT link local:
Thu Oct 18 09:58:50 2007 TCPv4_CLIENT link remote: 125.31.237.122:443
Thu Oct 18 09:58:50 2007 Connection reset, restarting
Thu Oct 18 09:58:50 2007 SIGUSR1 received, process restarting
Thu Oct 18 09:58:55 2007 LZO compression initialized
Thu Oct 18 09:58:55 2007 TAP-WIN32 device opened: \\.\Global\{F6CEE821-AF42-4BBB-B244-7FB596418A1A}.tap
Thu Oct 18 09:58:55 2007 Successful ARP Flush on interface {F6CEE821-AF42-4BBB-B244-7FB596418A1A}
Thu Oct 18 09:58:55 2007 Attempting to establish TCP connection with 125.31.237.122:443
Thu Oct 18 09:58:55 2007 TCP connection established with 125.31.237.122:443
Thu Oct 18 09:58:55 2007 TCPv4_CLIENT link local:
Thu Oct 18 09:58:55 2007 TCPv4_CLIENT link remote: 125.31.237.122:443
Thu Oct 18 09:58:55 2007 Connection reset, restarting
Thu Oct 18 09:58:55 2007 SIGUSR1 received, process restarting
连不上服务器 是什么原因

yanqiuming 发表于 2007-10-18 11:07

好文阿!!

yanqiuming 发表于 2007-10-18 11:08

好文中的好文,希望有图片教程。

CRCERIC 发表于 2007-10-18 11:13

回复 #6 ppbread 的帖子

在诊断 文本框内输入

ps | grep myvpn

运行后得到什么提示 一般这种情况首先检查路由是否成功运行vpn

再检测客户端跟路由的连接

[ Edited byCRCERIC on 2007-10-18 12:51 ]

CRCERIC 发表于 2007-10-18 11:16

Posted by yanqiuming on 2007-10-18 12:38 http://www.ibmnb.com/images/common/back.gif
好文中的好文,希望有图片教程。

图片本来已经上传了 昨天不小心删掉了

ppbread 发表于 2007-10-18 11:54

快点把图 弄上来吧

ppbread 发表于 2007-10-18 11:57

现在关键是code
openvpn --mktun --dev tap0   brctl addif br0 tap0   
ifconfig tap0 0.0.0.0 promisc up
echo "
-----BEGIN OpenVPN Static key V1-----
注:这里粘贴刚才生成的key.txt里的内容 包括上下
-----END OpenVPN Static key V1-----   
" > /tmp/static.key   ln -s /usr/sbin/openvpn /tmp/myvpn   
那里说包括上下 跟本说不清楚
key.txt里面也有-----BEGIN OpenVPN Static key V1----------END OpenVPN Static key V1----- 到底怎么覆盖 说不清楚

ppbread 发表于 2007-10-18 12:04

如果输入命令后没有显示那又代表什么

CRCERIC 发表于 2007-10-18 20:30

Posted by ppbread on 2007-10-18 13:27 http://www.ibmnb.com/images/common/back.gif
现在关键是code
openvpn --mktun --dev tap0   brctl addif br0 tap0   
ifconfig tap0 0.0.0.0 promisc up
echo "
-----BEGIN OpenVPN Static key V1-----
注:这里粘贴刚才生成的key.txt里的内容 包括 ...

就是把生成的key.txt里面的 内容贴到这个上面

CRCERIC 发表于 2007-10-18 20:32

:) 有的dd wrt的版本是输入后没有显示的
我测试的dd wrt 版本是8月15日v24 vpn运行后是没有显示的 但是点击 save with cosutom scripe 会显示出来运行成功了

楼上的兄弟 如果架设成功了 分享一下喜悦

[ Edited byCRCERIC on 2007-10-18 22:15 ]

ppbread 发表于 2007-10-18 23:08

已经架设成功,但好像不能跟路由器通信,就是没有数据包通过,怪怪的

CRCERIC 发表于 2007-10-18 23:45

dns 动态域名 ping的通吗?

yanqiuming 发表于 2007-10-19 10:16

好文必须收藏。

loveibmnb 发表于 2007-10-20 09:50

请教CRCERIC一下:
作为客户端的电脑,能连上作为VPN服务器的路由器,但是,客户端要上internet,还需要其他设置吗?
因为,我看了其他文章,都是用电脑搭建VPN服务器,并且,在服务器上安装设置了wingate等代理软件,这样,客户端才能通过VPN服务器上internet。谢谢。

CRCERIC 发表于 2007-10-20 10:17

回复 #19 loveibmnb 的帖子

不需要其他设置 因为当你vpn连接成功后 你就客户端就是路由器局域网下的一个电脑可以没有任何限制的访问internet
其实用路由器做vpn服务器 原理和在电脑上架设是差不多的

cccff 发表于 2007-10-20 23:37

vpn用来干嘛,穿越防火墙??

毕+索 发表于 2007-11-5 13:32

超级好,回去慢慢看,谢谢

wxcxyz 发表于 2007-11-11 13:56

按照这个设置成功,能够上网,就是笔记本端连接不稳定,虚拟网卡一直一会接好了一会又断开。

openkg 发表于 2007-11-11 14:48

楼上兄弟,断线说明你的公司网络不稳定,我QQ传给你的图片你都接收不到,也说明了这一点,看来你公司网络做openvpn是有不稳定可能的!

wxcxyz 发表于 2007-11-11 21:38

最新发现,我们这边直接用IE加代理也是可以的,看来我这边VPN直接就是没有成功啊

kidmode 发表于 2008-1-6 23:24

问下LZ。这样的方法只能连接一个用户?能不能同时连接2个甚至更多?最好能单独的设置每个人的密码?

我一直在研究怎么用EDGE 通过WAP上网呢。找代理。我买的WRT54G V2 刷的DD VPN最新的版本昨天刷的。

希望你能加我QQ。594252036 著名VPN。谢谢。帮帮我吧。谢谢你。

盘丝大仙 发表于 2008-1-16 18:14

我的连接不上提示如下:
9090 root      488 S   sh -c alias ping='ping -c 3'; eval "ps | grep vpn" >
9092 root      380 S   grep vpn

Wed Jan 16 16:33:26 2008 OpenVPN 2.0.5 Win32-MinGW built on Nov2 2005
Wed Jan 16 16:33:26 2008 LZO compression initialized
Wed Jan 16 16:33:27 2008 TAP-WIN32 device [本地连接 5] opened: \\.\Global\{FF8DB330-3B06-4D8D-A691-2AC14AC78A30}.tap
Wed Jan 16 16:33:27 2008 Successful ARP Flush on interface {FF8DB330-3B06-4D8D-A691-2AC14AC78A30}
Wed Jan 16 16:33:27 2008 Attempting to establish TCP connection with 10.0.0.172:80
Wed Jan 16 16:33:28 2008 TCP connection established with 10.0.0.172:80
Wed Jan 16 16:33:30 2008 HTTP proxy returned bad status
Wed Jan 16 16:33:30 2008 SIGUSR1 received, process restarting

我用的是LINKSYS WRT54G 54M V2版,固件: DD-WRT v24 Beta (05/02/07) std
是不是没刷成带vpn的固件的原因?希望推荐一个固件,谢谢!QQ:39563176

jick004 发表于 2008-1-18 10:15

真是好东西,找这个好久了!~

孑然一身 发表于 2008-1-19 13:25

是否只要DDWRT就可以工作了,不用电脑了?

k22m 发表于 2008-1-20 01:40

你买的哪款DD WRT路由器呀,我也想看看!真是强人,厉害!
页: [1] 2 3 4 5 6
查看完整版本: 【原创】DD WRT路由上架设openvpn-用于cmwap上网