luckylee77
我的客户端连接服务器后,过一会儿就会断开,大概1--2分钟自动连接。然后重复断开、重新连接。
server.conf
local *.*.*.*
port 12294
proto udp
dev tun
ca /opt/openvpn/keys/ca.crt
cert /opt/openvpn/keys/server.crt
key /opt/openvpn/keys/server.key # This file should be kept secret
dh /opt/openvpn/keys/dh.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist /opt/openvpn/log/ipp.txt
push "redirect-gateway def1 bypass-dhcp"
keepalive 10 120
tls-auth /opt/openvpn/keys/ta.key 0 # This file is secret
comp-lzo
max-clients 100
user nobody
group nobody
persist-key
persist-tun
status /opt/openvpn/log/openvpn-status.log
log /opt/openvpn/log/openvpn.log
log-append /opt/openvpn/log/openvpn.log
verb 4
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
client.ovpn
client
dev tun
proto udp
remote *.*.*.* 12294
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert amssy.crt
key client.key
#remote-cert-tls server
tls-auth ta.key 1
comp-lzo
verb 4
openvpn.log
Thu Apr 30 16:48:04 2015 us=649080 MULTI: multi_create_instance called
Thu Apr 30 16:48:04 2015 us=649189 124.193.136.82:13627 Re-using SSL/TLS context
Thu Apr 30 16:48:04 2015 us=649226 124.193.136.82:13627 LZO compression initialized
Thu Apr 30 16:48:04 2015 us=649333 124.193.136.82:13627 Control Channel MTU parms [ L:1542 D:166 EF:66 EB:0 ET:0 EL:0 ]
Thu Apr 30 16:48:04 2015 us=649349 124.193.136.82:13627 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1
]
Thu Apr 30 16:48:04 2015 us=649466 124.193.136.82:13627 Local Options String: 'V4,dev-type tun,link-mtu 1542,tun-mtu 1500,pro
to UDPv4,comp-lzo,keydir 0,cipher BF-CBC,auth SHA1,keysize 128,tls-auth,key-method 2,tls-server'
Thu Apr 30 16:48:04 2015 us=649480 124.193.136.82:13627 Expected Remote Options String: 'V4,dev-type tun,link-mtu 1542,tun-mt
u 1500,proto UDPv4,comp-lzo,keydir 1,cipher BF-CBC,auth SHA1,keysize 128,tls-auth,key-method 2,tls-client'
Thu Apr 30 16:48:04 2015 us=649520 124.193.136.82:13627 Local Options hash (VER=V4): '14168603'
Thu Apr 30 16:48:04 2015 us=649536 124.193.136.82:13627 Expected Remote Options hash (VER=V4): '504e774e'
Thu Apr 30 16:48:04 2015 us=649577 124.193.136.82:13627 TLS: Initial packet from [AF_INET]124.193.136.82:13627, sid=5fe4f5f3
7bdb7ef3
Thu Apr 30 16:48:04 2015 us=723146 TLS Error: cannot locate HMAC in incoming packet from [AF_INET]14.104.186.130:103
Thu Apr 30 16:48:04 2015 us=811652 TLS Error: cannot locate HMAC in incoming packet from [AF_INET]116.252.65.81:6072
Thu Apr 30 16:48:05 2015 us=261541 124.193.136.82:13627 VERIFY OK: depth=1, CN=amssy-ca
Thu Apr 30 16:48:05 2015 us=266608 124.193.136.82:13627 VERIFY OK: depth=0, CN=amssy-client
Thu Apr 30 16:48:05 2015 us=348372 124.193.136.82:13627 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Thu Apr 30 16:48:05 2015 us=348455 124.193.136.82:13627 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC auth
entication
Thu Apr 30 16:48:05 2015 us=348522 124.193.136.82:13627 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Thu Apr 30 16:48:05 2015 us=348534 124.193.136.82:13627 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC auth
entication
Thu Apr 30 16:48:05 2015 us=389243 124.193.136.82:13627 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 2048 b
it RSA
Thu Apr 30 16:48:05 2015 us=389324 124.193.136.82:13627 [amssy-client] Peer Connection Initiated with [AF_INET]124.193.136.82
:13627
Thu Apr 30 16:48:05 2015 us=389555 MULTI: new connection by client 'amssy-client' will cause previous active sessions by this
client to be dropped. Remember to use the --duplicate-cn option if you want multiple clients using the same certificate or
username to concurrently connect.
Thu Apr 30 16:48:05 2015 us=389589 MULTI_sva: pool returned IPv4=10.8.0.6, IPv6=(Not enabled)
Thu Apr 30 16:48:05 2015 us=389635 MULTI: Learn: 10.8.0.6 -> amssy-client/124.193.136.82:13627
Thu Apr 30 16:48:05 2015 us=389647 MULTI: primary virtual IP for amssy-client/124.193.136.82:13627: 10.8.0.6
Thu Apr 30 16:48:07 2015 us=681712 amssy-client/124.193.136.82:13627 PUSH: Received control message: 'PUSH_REQUEST'
Thu Apr 30 16:48:07 2015 us=681786 amssy-client/124.193.136.82:13627 send_push_reply(): safe_cap=940
Thu Apr 30 16:48:07 2015 us=681817 amssy-client/124.193.136.82:13627 SENT CONTROL [amssy-client]: 'PUSH_REPLY,redirect-gatewa
y def1 bypass-dhcp,dhcp-option DNS 8.8.8.8,dhcp-option DNS 8.8.4.4,route 10.8.0.1,topology net30,ping 10,ping-restart 120,ifc
onfig 10.8.0.6 10.8.0.5' (status=1)
Thu Apr 30 16:48:08 2015 us=26157 amssy-client/124.193.136.82:13627 MULTI: bad source address from client [::], packet droppe
d
Thu Apr 30 16:52:30 2015 us=438320 amssy-client/124.193.136.82:13627 [amssy-client] Inactivity timeout (--ping-restart), rest
arting
Thu Apr 30 16:52:30 2015 us=438404 amssy-client/124.193.136.82:13627 SIGUSR1[soft,ping-restart] received, client-instance res
tarting
Traffic
Please post client log
[google-translate: 请上传客户端日志 ]
luckylee77 wroteThu Apr 30 16:48:08 2015 us=26157 amssy-client/124.193.136.82:13627 MULTI: bad source address from client [::], packet dropped
This is ipv6 from you client and can be ignored ..
[google-translate: 这是从你的客户端IPv6和可以忽略 ]
It is probably your firewall ..
[google-translate: 这可能是你的防火墙 ]