| 本帖最後由 tomlee0101 於 2014-5-22 16:57 編輯 
 Configure DD-WRT as OPENVPN client ( e.g. China side router as openvpn client where you need to 破網翻墻 )
 
 成功 Tested with DD-WRT OPENVPN client with firmware DD-WRT v24-sp2 (05/17/11) vpn-small - build 17084M NEWD Eko connection with DD-WRT  OPENVPN server with firmware DD-WRT v24-sp2 (05/17/11) vpn-small - build 17084M NEWD Eko
 
 This is OpenVPN site-to-site connection, router-to-router connection.
 
 IMPORTANT :
 
 - Need to synchronize the DD-WRT OpenVPN client router's clock to the same time zone of OpenVPN server by proper configuration at Setup > BasicSetup > Time Settings
 
 - Need to use different subnets for DD-WRT client router and DD-WRT server router
 e.g. If DD-WRT server router uses 192.168.10.x,  then DD-WRT client router can use 192.168.20.x
 
 1. Services > VPN
 Start OpenVPN Client - Enable
 Server IP/Name                         - <OpenVPN server URL name or IP address>
 Port                                   - OpenVPN connection port number, default 1194, must match with OpenVPN server config, or 用其他不會被官方 block 的 Port number
 Tunnel Protocol                        - UDP or TCP, I used TCP, must match with OpenVPN server config
 Tunnel Device                          - TUN or TAP, I used TUN, must match with OpenVPN server config
 Encryption Cipher                      - Blowfish CBC, must match with OpenVPN server config
 Hash Algorithm                         - SHA1, must match with  OpenVPN server config
 nsCerttype verification                - Checked, must match with  OpenVPN server config
 Advanced Options                       - Enable
 Use LZO Compression                    - Enable
 Enable NAT                             - Enable
 Local IP Address                       - Leave blank
 TUN MTU Setting                        - Leave blank
 MSS-Fix/Fragment across the tunnel     - Leave blank
 TLS Cipher                             - OFF
 TLS Auth Key                           - Leave blank
 CA Cert                                - ca.crt
 Public Client Cert                     - client1.crt
 Public Client Key                      - client1.key
 
 If TLS authentication is implemented on DD-WRT OpenVPN server, populate the content of ta.key(generated in step #1 remark) to the field "TLS Auth Key ".
 Begin from "-----BEGIN OpenVPN Static key V1-----" to "-----END OpenVPN Static key V1-----" inclusive.
 
 2. Setup > Basic Setup
 Network Setup > Local DNS     8.8.8.8                                       <= Optional, use 8.8.8.8 in case the connected client cannot retrieve properly DNS, otherwise, use default value 0.0.0.0
 Network Address Server Setting(DHCP) > Use DNSMasq for DNS    uncheck box       <= Important, for proper DNS lookup
 
 3. Make sure clock is properly synchronized
 either by proper configuration at Setup > BasicSetup > Time Settings
 or set the time manually at Administration > Commands
 date MMDDHHMMYYYY
 
 3. Reboot DD-WRT OpenVPN client router and test
 - Make sure clock is properly synchronized
 - At Status > OpenVPN, it should show DD-WRT openVPN client router's connection virtual IP address, e.g. 192.168.60.2
 - Use a PC to connect to DD-WRT openVPN client router, the PC should be able to ping the DD-WRT OpenVPN server's virtual IP address, e.g. 192.168.60.1
 
 After the DD-WRT OpenVPN client router (China side) has successfully called/connected to the DD-WRT OpenVPN server router (Hong Kong side),  for any PC, Android, i-phone (China side) connected to DD-WRT openVPN client router (China side) via LAN port or WIFI afterwards, the traffic will be routed to DD-WRT OpenVPN server router (Hong Kong side) as gateway to access the internet. The PC, Android, i-phone (China side) does NOT need to install any software or do any special configuration. The DD-WRT OpenVPN client router (China side) will handle the 破網翻墻 job for the PC, Android, i-phone (China side) connected.
 |