user_openvpn
Hi,
It is observed that no tunnel interface was created on clients after connection to the openvpn server. The openvpn server was running since a long time and already had many clients connected. Also in the logs it is observed that no tunnel ip address was assigned to the client while establishing connection,
PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1,dhcp-option DNS 10.8.0.1,route 10.8.0.0 255.255.255.0,topology net30'
Below are the conf files used,
client.conf
dev tun
client
proto tcp
remote 52.10.23.148 1194
ca ca.crt
cert client.crt
key client.key
resolv-retry infinite
persist-key
persist-tun
cipher AES-128-CBC
comp-lzo
verb 3
server.conf
dev tun0
proto tcp
port 1194
ca ca.crt
cert server.crt
key server.key
dh dh2048.pem
management localhost 5001
script-security 2
server 10.8.0.0 255.255.255.0
cipher AES-128-CBC
persist-key
persist-tun
reneg-sec 0
status /var/log/openvpn-status.log
verb 3
client-to-client
push "redirect-gateway def1"
#set the dns servers
push "dhcp-option DNS 10.8.0.1"
duplicate-cn
log-append /home/ubuntu/openvpn/openvpn.log
comp-lzo
openvpn client logs
Thu Apr 23 04:51:17 2015 Data Channel Encrypt: Cipher 'AES-128-CBC' initialized with 128 bit key
Thu Apr 23 04:51:17 2015 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Thu Apr 23 04:51:17 2015 Data Channel Decrypt: Cipher 'AES-128-CBC' initialized with 128 bit key
Thu Apr 23 04:51:17 2015 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Thu Apr 23 04:51:17 2015 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 2048 bit RSA
Thu Apr 23 04:51:17 2015 [server] Peer Connection Initiated with 52.10.23.148:1194
Thu Apr 23 04:51:19 2015 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
Thu Apr 23 04:51:19 2015 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1,dhcp-option DNS 10.8.0.1,route 10.8.0.0 255.255.255.0,topology net30'
Thu Apr 23 04:51:19 2015 OPTIONS IMPORT: --ifconfig/up options modified
Thu Apr 23 04:51:19 2015 OPTIONS IMPORT: route options modified
Thu Apr 23 04:51:19 2015 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Thu Apr 23 04:51:19 2015 ROUTE default_gateway=10.0.1.1
Thu Apr 23 04:51:19 2015 OpenVPN ROUTE: OpenVPN needs a gateway parameter for a --route option and no default was specified by either --route-gateway or --ifconfig options
Thu Apr 23 04:51:19 2015 OpenVPN ROUTE: failed to parse/resolve route for host/network: 10.8.0.0
Thu Apr 23 04:51:19 2015 TUN/TAP device tun0 opened
Thu Apr 23 04:51:19 2015 TUN/TAP TX queue length set to 100
Thu Apr 23 04:51:19 2015 up.sh tun0 1500 1560 init
Thu Apr 23 04:51:19 2015 NOTE: unable to redirect default gateway -- VPN gateway parameter (--route-gateway or --ifconfig) is missing
Thu Apr 23 04:51:19 2015 Initialization Sequence Complete
#ifconfig tun0
ifconfig: tun0: error fetching interface information: Device not found
Everything works fine if the openvpn server was restarted. Please let know if anyone faced the same scenario.