I have installed OpenVpn Server (2.2.0) in linux (centos 5.6) with a few Mikrotik Routers for hotspot authentication under vpn, the Mikrotiks are working with a few disconnects every hour but the windows clients could not connect.
Linux Server - Mikrotik Clients/ Windows Clients
server.conf
port 23
mode server
server 172.16.100.0 255.255.255.0
proto tcp-server
dev tun
tls-server
ca keys/XXX/ca.crt
cert keys/XXX/XXX.crt
key keys/XXX/XXX.key
dh keys/XXX/dh2048.pem
crl-verify keys/XXX/crl.pem
ifconfig-pool-persist ipp.txt
cipher BF-CBC
max-clients 50
keepalive 10 120
client-config-dir /etc/openvpn/servers/XXX/ccd
#comp-lzo
user nobody
group adm
persist-key
persist-tun
status openvpn-status.log
log-append openvpn.log
ccd-exclusive
verb 3
#comp-lzo and UDP are disabled because mikrotik routers does not support
I have set a static IP for each Mikrotik Router and windows client in the ccd File (ipp.txt did not set the correct ip address)
ccd file for Mikrotik1
#ifconfig-push clientIP serverIP
ifconfig-push 172.16.100.10 172.16.100.1
Windows clients could not connet, i get this error in the log file.ccd file for windowsclient1
ifconfig-push 172.16.100.9 255.255.255.0
Windowsclient1 stucked at "getting configuration"[X@X openvpn]# tail -f openvpn.log
Mon Oct 24 19:38:38 2011 xx.240.218.xx:57042 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Mon Oct 24 19:38:38 2011 xx.240.218.xx:57042 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Mon Oct 24 19:38:38 2011 xx.240.2x.xx:57042 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Mon Oct 24 19:38:38 2011 xx.240.218.xx:57042 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 2048 bit RSA
Mon Oct 24 19:38:38 2011 xx.240.218.xx:57042 [mikrotik1] Peer Connection Initiated with xx.240.218.xx:57042
Mon Oct 24 19:38:38 2011 mikrotik1/xx.240.218.xx:57042 OPTIONS IMPORT: reading client specific options from: /etc/openvpn/servers/XXXXX/ccd/mikrotik1
Mon Oct 24 19:38:38 2011 mikrotik1/xx.240.218.xx:57042 MULTI: Learn: 172.16.100.10 -> mikrotik1/xx.240.218.xx:57042
Mon Oct 24 19:38:38 2011 mikrotik1/xx.240.218.xx:57042 MULTI: primary virtual IP for mikrotik1/xx.240.218.xx:57042: 172.16.100.10
Mon Oct 24 19:38:38 2011 mikrotik1/xx.240.218.xx:57042 PUSH: Received control message: 'PUSH_REQUEST'
Mon Oct 24 19:38:38 2011 mikrotik1/xx.240.218.xx:57042 SENT CONTROL [mikrotik1]: 'PUSH_REPLY,route 172.16.100.1,topology net30,ping 10,ping-restart 120,ifconfig 172.16.100.10 172.16.100.1' (status=1)
Mon Oct 24 19:39:45 2011 MULTI: multi_create_instance called
Mon Oct 24 19:39:45 2011 Re-using SSL/TLS context
Mon Oct 24 19:39:45 2011 Control Channel MTU parms [ L:1543 D:140 EF:40 EB:0 ET:0 EL:0 ]
Mon Oct 24 19:39:45 2011 Data Channel MTU parms [ L:1543 D:1450 EF:43 EB:4 ET:0 EL:0 ]
Mon Oct 24 19:39:45 2011 Local Options hash (VER=V4): '7e068940'
Mon Oct 24 19:39:45 2011 Expected Remote Options hash (VER=V4): 'db02a8f8'
Mon Oct 24 19:39:45 2011 TCP connection established with xx.240.218.xx:57060
Mon Oct 24 19:39:45 2011 TCPv4_SERVER link local: [undef]
Mon Oct 24 19:39:45 2011 TCPv4_SERVER link remote: xx.240.218.xx:57060
Mon Oct 24 19:39:45 2011 xx.240.218.xx:57060 TLS: Initial packet from xx.240.218.xx:57060, sid=ea142558 cbfd8ff3
Mon Oct 24 19:39:49 2011 xx.240.218.xx:57060 CRL CHECK OK: /C=xx/ST=xxx/L=xxx/O=xxx.xx/emailAddress=xx@xxx.xxx
Mon Oct 24 19:39:49 2011 xx.240.218.xx:57060 VERIFY OK: depth=1, /C=xx/ST=xxx/L=xxx/O=xxx.xx/emailAddress=xx@xxx.xxx
Mon Oct 24 19:39:49 2011 xx.240.218.xx:57060 CRL CHECK OK: /C=xx/ST=xxx/L=xxx/O=xxx.xx/emailAddress=windowsclient@xxx.xxx
Mon Oct 24 19:39:49 2011 xx.240.218.xx:57060 VERIFY OK: depth=0, /C=xxx/ST=xx/L=xxx/O=xxx.xx/OU=Office/CN=windowsclient1/emailAddress=windowsclient@xxx.xxx
Mon Oct 24 19:39:50 2011 xx.240.218.xx:57060 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Mon Oct 24 19:39:50 2011 xx.240.218.xx:57060 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Mon Oct 24 19:39:50 2011 xx.240.218.xx:57060 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Mon Oct 24 19:39:50 2011 xx.240.218.xx:57060 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Mon Oct 24 19:39:50 2011 xx.240.218.xx:57060 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 2048 bit RSA
Mon Oct 24 19:39:50 2011 xx.240.218.xx:57060 [windowsclient1] Peer Connection Initiated with xx.240.218.xx:57060
Mon Oct 24 19:39:50 2011 windowsclient1/xx.240.218.xx:57060 OPTIONS IMPORT: reading client specific options from: /etc/openvpn/servers/XXXX/ccd/windowsclient1
Mon Oct 24 19:39:50 2011 windowsclient1/xx.240.218.xx:57060 MULTI: Learn: 172.16.100.9 -> windowsclient1/xx.240.218.xx:57060
Mon Oct 24 19:39:50 2011 windowsclient1/xx.240.218.xx:57060 MULTI: primary virtual IP for windowsclient1/xx.240.218.xx:57060: 172.16.100.9
Mon Oct 24 19:39:52 2011 windowsclient1/xx.240.218.xx:57060 PUSH: Received control message: 'PUSH_REQUEST'
Mon Oct 24 19:39:52 2011 windowsclient1/xx.240.218.xx:57060 SENT CONTROL [windowsclient1]: 'PUSH_REPLY,route 172.16.100.1,topology net30,ping 10,ping-restart 120,ifconfig 172.16.100.9 255.255.255.0' (status=1)
Mon Oct 24 19:39:53 2011 windowsclient1/xx.240.218.xx:57060 Connection reset, restarting [-1]
Mon Oct 24 19:39:53 2011 windowsclient1/xx.240.218.xx:57060 SIGUSR1[soft,connection-reset] received, client-instance restarting
Mon Oct 24 19:39:53 2011 TCP/UDP: Closing socket
Config files were generated by webmin module for openvpn +CAwindowsclient1 config file
client
proto tcp-client
dev tun
ca ca.crt
dh dh2048.pem
cert windowsclient1.crt
key windowsclient1.key
remote server.xx.xx 23
cipher BF-CBC
verb 2
mute 20
keepalive 10 120
persist-key
persist-tun
float
resolv-retry infinite
nobind
Any help ?
Thanks