i just found what happened for this error.
cert "D:\\Program Files\\OpenVPN\\easy-rsa\\keys\\lightening.crt"
key "D:\\Program Files\\OpenVPN\\easy-rsa\\keys\\lightening.crt"
Here they are same.
But after my modification. The error log on my client is as follows.
Tue Oct 07 23:35:33 2014 us=721027 Current Parameter Settings:
Tue Oct 07 23:35:33 2014 us=722030 config = 'client.ovpn'
Tue Oct 07 23:35:33 2014 us=722030 mode = 0
Tue Oct 07 23:35:33 2014 us=722030 show_ciphers = DISABLED
Tue Oct 07 23:35:33 2014 us=722030 show_digests = DISABLED
Tue Oct 07 23:35:33 2014 us=722030 show_engines = DISABLED
Tue Oct 07 23:35:33 2014 us=722030 genkey = DISABLED
Tue Oct 07 23:35:33 2014 us=722030 key_pass_file = '[UNDEF]'
Tue Oct 07 23:35:33 2014 us=722030 show_tls_ciphers = DISABLED
Tue Oct 07 23:35:33 2014 us=722030 Connection profiles [default]:
Tue Oct 07 23:35:33 2014 us=722030 proto = tcp-client
Tue Oct 07 23:35:33 2014 us=722030 local = '[UNDEF]'
Tue Oct 07 23:35:33 2014 us=722030 local_port = 0
Tue Oct 07 23:35:33 2014 us=722030 remote = '78.91.2.204'
Tue Oct 07 23:35:33 2014 us=722030 remote_port = 1194
Tue Oct 07 23:35:33 2014 us=722030 remote_float = DISABLED
Tue Oct 07 23:35:33 2014 us=722030 bind_defined = DISABLED
Tue Oct 07 23:35:33 2014 us=722030 bind_local = DISABLED
Tue Oct 07 23:35:33 2014 us=722030 connect_retry_seconds = 5
Tue Oct 07 23:35:33 2014 us=722030 connect_timeout = 10
Tue Oct 07 23:35:33 2014 us=722030 NOTE: --mute triggered...
Tue Oct 07 23:35:33 2014 us=722030 265 variation(s) on previous 20 message(s) suppressed by --mute
Tue Oct 07 23:35:33 2014 us=722030 OpenVPN 2.3.4 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [PKCS11] [IPv6] built on Aug 7 2014
Tue Oct 07 23:35:33 2014 us=722030 library versions: OpenSSL 1.0.1i 6 Aug 2014, LZO 2.05
Enter Management Password:
Tue Oct 07 23:35:33 2014 us=724032 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:25340
Tue Oct 07 23:35:33 2014 us=724032 Need hold release from management interface, waiting...
Tue Oct 07 23:35:34 2014 us=194485 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:25340
Tue Oct 07 23:35:34 2014 us=296555 MANAGEMENT: CMD 'state on'
Tue Oct 07 23:35:34 2014 us=296555 MANAGEMENT: CMD 'log all on'
Tue Oct 07 23:35:34 2014 us=318567 MANAGEMENT: CMD 'hold off'
Tue Oct 07 23:35:34 2014 us=319568 MANAGEMENT: CMD 'hold release'
Tue Oct 07 23:35:34 2014 us=464666 Control Channel Authentication: using 'D:\Program Files\OpenVPN\easy-rsa\keys\ta.key' as a OpenVPN static key file
Tue Oct 07 23:35:34 2014 us=464666 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Tue Oct 07 23:35:34 2014 us=464666 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Tue Oct 07 23:35:34 2014 us=464666 LZO compression initialized
Tue Oct 07 23:35:34 2014 us=464666 Control Channel MTU parms [ L:1544 D:168 EF:68 EB:0 ET:0 EL:0 ]
Tue Oct 07 23:35:34 2014 us=464666 Socket Buffers: R=[65536->65536] S=[65536->65536]
Tue Oct 07 23:35:34 2014 us=464666 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ]
Tue Oct 07 23:35:34 2014 us=464666 Local Options String: 'V4,dev-type tun,link-mtu 1544,tun-mtu 1500,proto TCPv4_CLIENT,comp-lzo,keydir 1,cipher DES-EDE3-CBC,auth SHA1,keysize 192,tls-auth,key-method 2,tls-client'
Tue Oct 07 23:35:34 2014 us=464666 Expected Remote Options String: 'V4,dev-type tun,link-mtu 1544,tun-mtu 1500,proto TCPv4_SERVER,comp-lzo,keydir 0,cipher DES-EDE3-CBC,auth SHA1,keysize 192,tls-auth,key-method 2,tls-server'
Tue Oct 07 23:35:34 2014 us=464666 Local Options hash (VER=V4): '2dcdad92'
Tue Oct 07 23:35:34 2014 us=464666 Expected Remote Options hash (VER=V4): '7c7a0a5e'
Tue Oct 07 23:35:34 2014 us=464666 Attempting to establish TCP connection with [AF_INET]78.91.2.204:1194
Tue Oct 07 23:35:34 2014 us=464666 MANAGEMENT: >STATE:1412717734,TCP_CONNECT,,,
Tue Oct 07 23:35:35 2014 us=465335 TCP: connect to [AF_INET]78.91.2.204:1194 failed, will try again in 5 seconds: Connection refused (WSAECONNREFUSED)
Tue Oct 07 23:35:40 2014 us=468375 MANAGEMENT: >STATE:1412717740,TCP_CONNECT,,,
Tue Oct 07 23:35:41 2014 us=465150 TCP: connect to [AF_INET]78.91.2.204:1194 failed, will try again in 5 seconds: Connection refused (WSAECONNREFUSED)
Tue Oct 07 23:35:45 2014 us=468518 SIGTERM[hard,init_instance] received, process exiting
Tue Oct 07 23:35:45 2014 us=468518 MANAGEMENT: >STATE:1412717745,EXITING,init_instance,,
It was udp before and I saw a thread to let me change to tcp. Then I checked the port as follows.
lsof -i:1194
openvpn 10205 nobody 4u IPv4 21260 0t0 UDP *:openvpn
openvpn 10596 nobody 6u IPv4 23990 0t0 TCP *:openvpn (LISTEN)
I used this code
echo 1 > /proc/sys/net/ipv4/ip_forward
in the guide here:
http://www.tecmint.com/install-openvpn-in-debian/
I did not use the one in here with iptables:
https://stavrovski.net/blog/installing-and-setting-up-openvpn-in-archlinux#deploy-certs-server Because the error comes as
root@BavM:/home/bavm# iptables-save > /etc/iptables/iptables.rules
bash: /etc/iptables/iptables.rules: No such file or directory