返回列表 發帖

本帖最後由 角色 於 2013-11-24 00:41 編輯

Based on [1], we installed
  1. opkg update
  2. opkg install openvpn openvpn-easy-rsa
複製代碼
【1】http://wiki.openwrt.org/inbox/vpn.howto

TOP

备用帖子。

TOP

本帖最後由 角色 於 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
  1. port    1194
  2. proto   udp
  3. dev-type     tun
  4. dev vpn-user

  5. ca      ca.crt
  6. cert    server.crt
  7. key     server.key
  8. dh      dh1024.pem

  9. # enable compression
  10. comp-lzo

  11. # allow several users to connect with the same certificate
  12. duplicate-cn

  13. server  10.30.0.0 255.255.255.0
  14. client-to-client

  15. keepalive 10 120

  16. push    "dhcp-option DOMAIN jl.selfip.org"
  17. push    "dhcp-option DNS 8.8.8.8"
  18. push    "redirect-gateway def1"

  19. persist-key
  20. persist-tun

  21. user nobody
  22. group nogroup

  23. #log vpn.log
  24. verb 3
複製代碼
4b. Using the following script to run openvpn with the server configuration file vpn.conf
  1. openvpn --config vpn.conf
複製代碼
5. 安装Windows on PC 的Openvpn,最好选用 2.2版本。
  1. remote jl.selfip.org
  2. port 1194
  3. proto udp
  4. dev tun

  5. comp-lzo

  6. client

  7. resolv-retry infinite
  8. nobind
  9. persist-key
  10. persist-tun
  11. ns-cert-type server

  12. verb 3

  13. ca      ca.crt
  14. cert    client1.crt
  15. key     client1.key


  16. ping 10
  17. ping-restart 60
複製代碼

TOP

上面是把OpenVPN最重要的step说出,等有时间,再把整个程序写出来,那么大家member可以跟着做。

系统连接好后,Client的PC的packets会通过HK Server的gateway走。

TOP

windows版本的2.3也是可以的,我一直在用,但如果要在windows下制作证书,那就还是2.2的比较好,反正我折腾2.3,搞了很久都没有成功,但换成2.2,一下就ok了,另外,最好是在XP或是win7下搞。

TOP

所以我也不用2.3,转回用2.2

TOP

返回列表