各位大大,小弟这里有个openvpn的问题请教各位。
现在有一个VPS 安装OPENVPN server 。10.8.0.1
- port 8090
- proto udp
- dev tun
- ca ca.crt
- cert server.crt
- key server.key # This file should be kept secret
- dh dh4096.pem
- server 10.8.0.0 255.255.255.0
- ifconfig-pool-persist ipp.txt
- client-to-client
- keepalive 10 120
- cipher AES-256-CBC
- persist-key
- persist-tun
- status openvpn-status.log
- verb 3
- keysize 256
- explicit-exit-notify 1
复制代码 以及server log 文件
- Tue Oct 17 17:06:30 2017 WARNING: --keysize is DEPRECATED and will be removed in OpenVPN 2.6
- Tue Oct 17 17:06:30 2017 OpenVPN 2.4.4 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] built on Sep 26 2017
- Tue Oct 17 17:06:30 2017 Windows version 6.2 (Windows 8 or greater) 64bit
- Tue Oct 17 17:06:30 2017 library versions: OpenSSL 1.0.2l 25 May 2017, LZO 2.10
- Enter Management Password:
- Tue Oct 17 17:06:30 2017 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:25340
- Tue Oct 17 17:06:30 2017 Need hold release from management interface, waiting...
- Tue Oct 17 17:06:31 2017 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:25340
- Tue Oct 17 17:06:31 2017 MANAGEMENT: CMD 'state on'
- Tue Oct 17 17:06:31 2017 MANAGEMENT: CMD 'log all on'
- Tue Oct 17 17:06:31 2017 MANAGEMENT: CMD 'echo all on'
- Tue Oct 17 17:06:31 2017 MANAGEMENT: CMD 'hold off'
- Tue Oct 17 17:06:31 2017 MANAGEMENT: CMD 'hold release'
- Tue Oct 17 17:06:31 2017 Diffie-Hellman initialized with 4096 bit key
- Tue Oct 17 17:06:31 2017 interactive service msg_channel=0
- Tue Oct 17 17:06:31 2017 ROUTE_GATEWAY $.184.66.1/255.255.255.192 I=12 HWADDR=00:16:3e:f6:2c:24
- Tue Oct 17 17:06:31 2017 open_tun
- Tue Oct 17 17:06:31 2017 TAP-WIN32 device [以太网 2] opened: \\.\Global\{6F87E538-7DB5-478F-9C72-D4F42256B753}.tap
- Tue Oct 17 17:06:31 2017 TAP-Windows Driver Version 9.21
- Tue Oct 17 17:06:31 2017 Notified TAP-Windows driver to set a DHCP IP/netmask of 10.8.0.1/255.255.255.252 on interface {6F87E538-7DB5-478F-9C72-D4F42256B753} [DHCP-serv: 10.8.0.2, lease-time: 31536000]
- Tue Oct 17 17:06:31 2017 Sleeping for 10 seconds...
- Tue Oct 17 17:06:41 2017 Successful ARP Flush on interface [15] {6F87E538-7DB5-478F-9C72-D4F42256B753}
- Tue Oct 17 17:06:41 2017 do_ifconfig, tt->did_ifconfig_ipv6_setup=0
- Tue Oct 17 17:06:41 2017 MANAGEMENT: >STATE:1508231201,ASSIGN_IP,,10.8.0.1,,,,
- Tue Oct 17 17:06:41 2017 MANAGEMENT: >STATE:1508231201,ADD_ROUTES,,,,,,
- Tue Oct 17 17:06:41 2017 C:\Windows\system32\route.exe ADD 10.8.0.0 MASK 255.255.255.0 10.8.0.2
- Tue Oct 17 17:06:41 2017 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=20 and dwForwardType=4
- Tue Oct 17 17:06:41 2017 Route addition via IPAPI succeeded [adaptive]
- Tue Oct 17 17:06:41 2017 Could not determine IPv4/IPv6 protocol. Using AF_INET6
- Tue Oct 17 17:06:41 2017 Socket Buffers: R=[65536->65536] S=[65536->65536]
- Tue Oct 17 17:06:41 2017 setsockopt(IPV6_V6ONLY=0)
- Tue Oct 17 17:06:41 2017 UDPv6 link local (bound): [AF_INET6][undef]:8090
- Tue Oct 17 17:06:41 2017 UDPv6 link remote: [AF_UNSPEC]
- Tue Oct 17 17:06:41 2017 MULTI: multi_init called, r=256 v=256
- Tue Oct 17 17:06:41 2017 IFCONFIG POOL: base=10.8.0.4 size=62, ipv6=0
- Tue Oct 17 17:06:41 2017 ifconfig_pool_read(), in='$1client,10.8.0.4', TODO: IPv6
- Tue Oct 17 17:06:41 2017 succeeded -> ifconfig_pool_set()
- Tue Oct 17 17:06:41 2017 ifconfig_pool_read(), in='client2,10.8.0.8', TODO: IPv6
- Tue Oct 17 17:06:41 2017 succeeded -> ifconfig_pool_set()
- Tue Oct 17 17:06:41 2017 ifconfig_pool_read(), in='client3,10.8.0.12', TODO: IPv6
- Tue Oct 17 17:06:41 2017 succeeded -> ifconfig_pool_set()
- Tue Oct 17 17:06:41 2017 IFCONFIG POOL LIST
- Tue Oct 17 17:06:41 2017 $1client,10.8.0.4
- Tue Oct 17 17:06:41 2017 client2,10.8.0.8
- Tue Oct 17 17:06:41 2017 client3,10.8.0.12
- Tue Oct 17 17:06:41 2017 Initialization Sequence Completed
- Tue Oct 17 17:06:41 2017 MANAGEMENT: >STATE:1508231201,CONNECTED,SUCCESS,10.8.0.1,,,,
- Tue Oct 17 17:06:56 2017 $.219.88.21 TLS: Initial packet from [AF_INET6]::ffff:$.219.88.21:51618, sid=5ea9b331 1c2a93e3
- Tue Oct 17 17:06:56 2017 $.130.247.15 TLS: Initial packet from [AF_INET6]::ffff:$.130.247.15:2204, sid=e91ffdc9 74788aad
- Tue Oct 17 17:06:57 2017 $.130.247.15 VERIFY OK: depth=1, C=CN, ST=YN, L=BAOSHAN, O=$, OU=changeme, CN=$1, name=changeme, emailAddress=$$@163.com
- Tue Oct 17 17:06:57 2017 $.130.247.15 VERIFY OK: depth=0, C=CN, ST=YN, L=BAOSHAN, O=$, OU=changeme, CN=$1client, name=changeme, emailAddress=$$@163.com
- Tue Oct 17 17:06:57 2017 $.130.247.15 peer info: IV_VER=2.3.11
- Tue Oct 17 17:06:57 2017 $.130.247.15 peer info: IV_PLAT=linux
- Tue Oct 17 17:06:57 2017 $.130.247.15 peer info: IV_PROTO=2
- Tue Oct 17 17:06:57 2017 $.130.247.15 Outgoing Data Channel: Cipher 'AES-256-CBC' initialized with 256 bit key
- Tue Oct 17 17:06:57 2017 $.130.247.15 Outgoing Data Channel: Using 160 bit message hash 'SHA1' for HMAC authentication
- Tue Oct 17 17:06:57 2017 $.130.247.15 Incoming Data Channel: Cipher 'AES-256-CBC' initialized with 256 bit key
- Tue Oct 17 17:06:57 2017 $.130.247.15 Incoming Data Channel: Using 160 bit message hash 'SHA1' for HMAC authentication
- Tue Oct 17 17:06:57 2017 $.130.247.15 Control Channel: TLSv1.2, cipher TLSv1/SSLv3 ECDHE-RSA-AES256-GCM-SHA384, 4096 bit RSA
- Tue Oct 17 17:06:57 2017 $.130.247.15 [$1client] Peer Connection Initiated with [AF_INET6]::ffff:$.130.247.15:2204
- Tue Oct 17 17:06:57 2017 $1client/$.130.247.15 MULTI_sva: pool returned IPv4=10.8.0.6, IPv6=(Not enabled)
- Tue Oct 17 17:06:57 2017 $1client/$.130.247.15 MULTI: Learn: 10.8.0.6 -> $1client/$.130.247.15
- Tue Oct 17 17:06:57 2017 $1client/$.130.247.15 MULTI: primary virtual IP for $1client/$.130.247.15: 10.8.0.6
- Tue Oct 17 17:06:59 2017 $1client/$.130.247.15 PUSH: Received control message: 'PUSH_REQUEST'
- Tue Oct 17 17:06:59 2017 $1client/$.130.247.15 SENT CONTROL [$1client]: 'PUSH_REPLY,route 10.8.0.0 255.255.255.0,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.6 10.8.0.5,peer-id 1' (status=1)
- Tue Oct 17 17:07:06 2017 $.219.88.21 VERIFY OK: depth=1, C=CN, ST=YN, L=BAOSHAN, O=$, OU=changeme, CN=$1, name=changeme, emailAddress=$$$@163.com
- Tue Oct 17 17:07:06 2017 $.219.88.21 VERIFY OK: depth=0, C=CN, ST=YN, L=BAOSHAN, O=$, OU=changeme, CN=client3, name=changeme, emailAddress=$$$@163.com
- Tue Oct 17 17:07:06 2017 $.219.88.21 WARNING: 'link-mtu' is used inconsistently, local='link-mtu 1557', remote='link-mtu 1500'
- Tue Oct 17 17:07:06 2017 $.219.88.21 WARNING: 'tun-mtu' is used inconsistently, local='tun-mtu 1500', remote='tun-mtu 1443'
- Tue Oct 17 17:07:06 2017 $.219.88.21 Outgoing Data Channel: Cipher 'AES-256-CBC' initialized with 256 bit key
- Tue Oct 17 17:07:06 2017 $.219.88.21 Outgoing Data Channel: Using 160 bit message hash 'SHA1' for HMAC authentication
- Tue Oct 17 17:07:06 2017 $.219.88.21 Incoming Data Channel: Cipher 'AES-256-CBC' initialized with 256 bit key
- Tue Oct 17 17:07:06 2017 $.219.88.21 Incoming Data Channel: Using 160 bit message hash 'SHA1' for HMAC authentication
- Tue Oct 17 17:07:06 2017 $.219.88.21 Control Channel: TLSv1, cipher TLSv1/SSLv3 ECDHE-RSA-AES256-SHA, 4096 bit RSA
- Tue Oct 17 17:07:06 2017 $.219.88.21 [client3] Peer Connection Initiated with [AF_INET6]::ffff:$.219.88.21:51618
- Tue Oct 17 17:07:06 2017 client3/$.219.88.21 MULTI_sva: pool returned IPv4=10.8.0.14, IPv6=(Not enabled)
- Tue Oct 17 17:07:06 2017 client3/$.219.88.21 MULTI: Learn: 10.8.0.14 -> client3/$.219.88.21
- Tue Oct 17 17:07:06 2017 client3/$.219.88.21 MULTI: primary virtual IP for client3/$.219.88.21: 10.8.0.14
- Tue Oct 17 17:07:09 2017 client3/$.219.88.21 PUSH: Received control message: 'PUSH_REQUEST'
- Tue Oct 17 17:07:09 2017 client3/$.219.88.21 SENT CONTROL [client3]: 'PUSH_REPLY,route 10.8.0.0 255.255.255.0,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.14 10.8.0.13' (status=1)
- Tue Oct 17 17:07:55 2017 SENT CONTROL [$1client]: 'RESTART' (status=1)
- Tue Oct 17 17:07:55 2017 SENT CONTROL [client3]: 'RESTART' (status=1)
- Tue Oct 17 17:07:55 2017 C:\Windows\system32\route.exe DELETE 10.8.0.0 MASK 255.255.255.0 10.8.0.2
- Tue Oct 17 17:07:55 2017 Route deletion via IPAPI succeeded [adaptive]
- Tue Oct 17 17:07:55 2017 Closing TUN/TAP interface
- Tue Oct 17 17:07:55 2017 TAP: DHCP address released
- Tue Oct 17 17:07:55 2017 SIGTERM[hard,] received, process exiting
- Tue Oct 17 17:07:55 2017 MANAGEMENT: >STATE:1508231275,EXITING,SIGTERM,,,,,
复制代码
客户端1为树莓派 10.8.0.14
- client
- dev tun
- proto udp
- remote 118.184.66.56 8090
- resolv-retry infinite
- nobind
- persist-key
- persist-tun
- ca /etc/openvpn/ca.crt
- cert /etc/openvpn/client.crt
- key /etc/openvpn/client.key
- verb 3
复制代码
客户端2为爱快路由 10.8.0.6
互相能够ping通,也能访问客户端1的局域网共享。
现在我需要访问 爱快路由下的 局域网中的(192.168.1.220),请问改如何设置?谢谢。
|