C:\Program Files\OpenVPN\bin>openvpn.exe --ifconfig 10.200.0.2 10.200.0.1 --dev t
un --remote hostname_or_ip_address_of_OpenVPN_server
複製代碼
作者: 角色 時間: 2013-11-24 16:02
本帖最後由 角色 於 2013-11-24 16:49 編輯
Server side
Additional messages from the Server side:
root@OpenWrt:~# openvpn --ifconfig 10.200.0.1 10.200.0.2 --dev tun
Sun Nov 24 10:50:09 2013 OpenVPN 2.2.2 mips-openwrt-linux [SSL] [LZO2] [EPOLL] built on Mar 14 2013
Sun Nov 24 10:50:09 2013 IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA. OpenVPN 2.0-beta16 and earlier used 5000 as the default port.
Sun Nov 24 10:50:09 2013 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Sun Nov 24 10:50:09 2013 ******* WARNING *******: all encryption and authentication features disabled -- all data will be tunnelled as cleartext
Sun Nov 24 10:50:09 2013 TUN/TAP device tun0 opened
Sun Nov 24 10:50:09 2013 /sbin/ifconfig tun0 10.200.0.1 pointopoint 10.200.0.2 mtu 1500
Sun Nov 24 10:50:09 2013 UDPv4 link local (bound): [undef]:1194
Sun Nov 24 10:50:09 2013 UDPv4 link remote: [undef]
Sun Nov 24 10:52:37 2013 Peer Connection Initiated with 218.250.7.110:59085
Sun Nov 24 10:52:37 2013 Initialization Sequence Completed
複製代碼
Ping the virtual IP address 10.200.0.2 of the client, we have
root@OpenWrt:~# ping -c 4 10.200.0.2
PING 10.200.0.2 (10.200.0.2): 56 data bytes
64 bytes from 10.200.0.2: seq=0 ttl=64 time=10.193 ms
64 bytes from 10.200.0.2: seq=1 ttl=64 time=6.595 ms
64 bytes from 10.200.0.2: seq=2 ttl=64 time=5.533 ms
64 bytes from 10.200.0.2: seq=3 ttl=64 time=7.758 ms
--- 10.200.0.2 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 5.533/7.519/10.193 ms
root@OpenWrt:~#
複製代碼
作者: 角色 時間: 2013-11-24 16:47
本帖最後由 角色 於 2013-11-24 16:54 編輯
Client Side
When the connection was okey, it gave
C:\Program Files\OpenVPN\bin>openvpn.exe -ifconfig 10.200.0.2 10.200.0.1 --dev t
un --remote 119.237.21.222
Options error: I'm trying to parse "-ifconfig" as an --option parameter but I do
Sun Nov 24 10:52:27 2013 OpenVPN 2.2.2 Win32-MSVC++ [SSL] [LZO2] [PKCS11] built
on Dec 15 2011
Sun Nov 24 10:52:27 2013 IMPORTANT: OpenVPN's default port number is now 1194, b
ased on an official port number assignment by IANA. OpenVPN 2.0-beta16 and earl
ier used 5000 as the default port.
Sun Nov 24 10:52:27 2013 NOTE: OpenVPN 2.1 requires '--script-security 2' or hig
her to call user-defined scripts or executables
Sun Nov 24 10:52:27 2013 ******* WARNING *******: all encryption and authenticat
ion features disabled -- all data will be tunnelled as cleartext
Sun Nov 24 10:52:27 2013 TAP-WIN32 device [本地连接 2] opened: \\.\Global\{A2FCF
4EE-7BB0-4C7D-AFC0-7F041F4D21FA}.tap
Sun Nov 24 10:52:27 2013 Notified TAP-Win32 driver to set a DHCP IP/netmask of 1
0.200.0.2/255.255.255.252 on interface {A2FCF4EE-7BB0-4C7D-AFC0-7F041F4D21FA} [D
HCP-serv: 10.200.0.1, lease-time: 31536000]
Sun Nov 24 10:52:27 2013 Successful ARP Flush on interface [131077] {A2FCF4EE-7B
B0-4C7D-AFC0-7F041F4D21FA}
Sun Nov 24 10:52:27 2013 UDPv4 link local (bound): [undef]:1194
Sun Nov 24 10:52:27 2013 UDPv4 link remote: 119.237.21.222:1194
Sun Nov 24 10:52:46 2013 Peer Connection Initiated with 119.237.21.222:1194
Sun Nov 24 10:52:52 2013 Initialization Sequence Completed
複製代碼
After the OpenVPN connection was established, the server virtual ip address 10.200.0.1 could be reachable
C:\Program Files\OpenVPN\bin>ping 10.200.0.1
Pinging 10.200.0.1 with 32 bytes of data:
Reply from 10.200.0.1: bytes=32 time=5ms TTL=64
Reply from 10.200.0.1: bytes=32 time=4ms TTL=64
Reply from 10.200.0.1: bytes=32 time=5ms TTL=64
Reply from 10.200.0.1: bytes=32 time=4ms TTL=64
Ping statistics for 10.200.0.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 4ms, Maximum = 5ms, Average = 4ms
C:\Program Files\OpenVPN\bin>
複製代碼
作者: tomleehk 時間: 2013-11-24 17:32
本帖最後由 tomleehk 於 2013-11-25 00:20 編輯
Thanks for your guidance. Just planned to learn OpenVPN on OpenWRT.
不要OpenVPN 2.3.2 -- released on 2013.06.03,因为试过不行。
角色 發表於 2013-11-24 15:51
I also found OpenVPN 2.3.2 connection problem. After I selected the option" disable the NETBIOS over TCP.IP" for the VIRTUAL network card that OpenVPN installed, I found the OpenVPN 2.3.2 connection problem was resolved immediately and it is still so far so good.作者: 角色 時間: 2013-11-24 17:37
Thank you for joining the OpenVPN-on-OpenWRT learning group such that we can prepare collecting learning materials and example for sharing in order to speed up the learning.
It is seen from your action "Disable the NETBIOS over TCP/IP", I guess you used TUN device instead of TAP device.作者: tomleehk 時間: 2013-11-25 00:48
本帖最後由 tomleehk 於 2013-11-25 01:01 編輯
It is seen from your action "Disable the NETBIOS over TCP/IP", I guess you used TUN device instead of TAP device.
角色 發表於 2013-11-24 17:37
Bingo...
I used
1) TUN and
2) TCPIP <= so that client side, after simple configuration file change, can via proxy server connect to VPN server.