標題:
【OpenWRT】—— OpenVPN Server and Client (准备篇)
[打印本頁]
作者:
角色
時間:
2013-11-18 00:37
標題:
【OpenWRT】—— OpenVPN Server and Client (准备篇)
本帖最後由 角色 於 2013-11-25 01:35 編輯
还没有建立OpenVPN,先来做点资料搜集。
References:
http://wiki.openwrt.org/doc/howto/vpn.overview
http://wiki.openwrt.org/inbox/vpn.howto
http://www.imped.net/oss/misc/openvpn-2.0-howto-edit.html
http://wiki.wirelesstoronto.ca/openvpn_stuff
http://p3f.gmxhome.de/OpenWRT/Configure-OpenVPN.html
Very good example to illustrate the client device traffic was redirected to the Server's gateway to Internet.
http://farlee.info/archives/burs ... fig-vpn-centos.html
http://wuklass.pixnet.net/blog/post/35347947
References for OpenVPN Server
Using Certs and Keys
http://www.frogiswrong.com/blog/ ... -little-more-detail
http://www.joeho.org/wordpress/?p=3849
http://unix.stackexchange.com/questions/16412/openvpn-on-openwrt
http://ostanin.org/blog/2012/09/ ... sites-with-openwrt/
http://lgallardo.com/en/2011/09/08/configurar-openvpn-en-openwrt/
http://fooprotected.wordpress.co ... nd-openwrt-openvpn/
Using Static Key
http://wiki.openwrt.org/doc/howto/vpn.server.openvpn.tun
http://wiki.openwrt.org/doc/howto/vpn.server.openvpn.tap
https://blog.ipredator.se/howto/ ... vpn-on-openwrt.html
http://openvpn.net/index.php/ope ... key-mini-howto.html
http://martybugs.net/wireless/openwrt/openvpn.cgi
http://coderazzi.net/howto/openwrt/tl841n/openvpn-bridge.htm
References for OpenVPN Client
http://wiki.openwrt.org/doc/howto/vpn.client.openvpn.tun
作者:
角色
時間:
2013-11-18 20:15
本帖最後由 角色 於 2013-11-24 00:41 編輯
Based on [1], we installed
opkg update
opkg install openvpn openvpn-easy-rsa
複製代碼
【1】
http://wiki.openwrt.org/inbox/vpn.howto
作者:
角色
時間:
2013-11-18 20:17
备用帖子。
作者:
角色
時間:
2013-12-7 18:38
本帖最後由 角色 於 2013-12-7 18:44 編輯
终于可以把OpenVPN安装在OpenWRT里了!
1. 安装openvpn package,不用安装它的GUI package
2. 做好OpenVPN选用的port number and type,我用standard,就1194 UDP port
3. 跟根据官网做certs,最重要的common name,这个是非常重要!详细看官网怎样generate certificates, keys, pems
4. On OpenWRT, using vi editor to create a file with a name "vpn.conf" which contains
port 1194
proto udp
dev-type tun
dev vpn-user
ca ca.crt
cert server.crt
key server.key
dh dh1024.pem
# enable compression
comp-lzo
# allow several users to connect with the same certificate
duplicate-cn
server 10.30.0.0 255.255.255.0
client-to-client
keepalive 10 120
push "dhcp-option DOMAIN jl.selfip.org"
push "dhcp-option DNS 8.8.8.8"
push "redirect-gateway def1"
persist-key
persist-tun
user nobody
group nogroup
#log vpn.log
verb 3
複製代碼
4b. Using the following script to run openvpn with the server configuration file vpn.conf
openvpn --config vpn.conf
複製代碼
5. 安装Windows on PC 的Openvpn,最好选用 2.2版本。
remote jl.selfip.org
port 1194
proto udp
dev tun
comp-lzo
client
resolv-retry infinite
nobind
persist-key
persist-tun
ns-cert-type server
verb 3
ca ca.crt
cert client1.crt
key client1.key
ping 10
ping-restart 60
複製代碼
作者:
角色
時間:
2013-12-7 18:48
上面是把OpenVPN最重要的step说出,等有时间,再把整个程序写出来,那么大家member可以跟着做。
系统连接好后,Client的PC的packets会通过HK Server的gateway走。
作者:
pusey
時間:
2014-1-14 12:12
windows版本的2.3也是可以的,我一直在用,但如果要在windows下制作证书,那就还是2.2的比较好,反正我折腾2.3,搞了很久都没有成功,但换成2.2,一下就ok了,另外,最好是在XP或是win7下搞。
作者:
角色
時間:
2014-1-14 20:06
所以我也不用2.3,转回用2.2
歡迎光臨 電訊茶室 (http://telecom-cafe.com/forum/)
Powered by Discuz! 7.2