Hi,
I installed OpenVPN Access Server 2.0.21 and openvpn package on my VPS running Ubuntu 12.04. It serves as a server.
server@remote:~$ openvpn --version
OpenVPN 2.2.1 x86_64-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Dec 1 2014
...
On my local machine I have
martin@local:~$ openvpn --version
OpenVPN 2.3.8 x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH] [IPv6] built on Dec 14 2015
...
In Access Server's GUI I set
Should client Internet traffic be routed through the VPN? YES
Have clients use these DNS servers:
Primary DNS Server: 8.8.8.8
Secondary DNS Server: 8.8.4.4
Server is up and running. Client startup shows:
martin@local:~$ sudo openvpn --config /home/martin/client.ovpn
Wed Dec 16 12:31:49 2015 OpenVPN 2.3.8 x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH] [IPv6] built on Dec 14 2015
Wed Dec 16 12:31:49 2015 library versions: OpenSSL 1.0.1f 6 Jan 2014, LZO 2.06
Enter Auth Username:openvpn
Enter Auth Password:
Wed Dec 16 12:32:01 2015 Control Channel Authentication: tls-auth using INLINE static key file
Wed Dec 16 12:32:01 2015 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Dec 16 12:32:01 2015 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Dec 16 12:32:01 2015 Socket Buffers: R=[212992->200000] S=[212992->200000]
Wed Dec 16 12:32:01 2015 UDPv4 link local: [undef]
Wed Dec 16 12:32:01 2015 UDPv4 link remote: [AF_INET]37.205.10.90:1194
Wed Dec 16 12:32:01 2015 TLS: Initial packet from [AF_INET]37.205.10.90:1194, sid=a749ac1d 337609bc
Wed Dec 16 12:32:01 2015 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Wed Dec 16 12:32:02 2015 VERIFY OK: depth=1, CN=OpenVPN CA
Wed Dec 16 12:32:02 2015 VERIFY OK: nsCertType=SERVER
Wed Dec 16 12:32:02 2015 VERIFY OK: depth=0, CN=OpenVPN Server
Wed Dec 16 12:32:02 2015 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Wed Dec 16 12:32:02 2015 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Dec 16 12:32:02 2015 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Wed Dec 16 12:32:02 2015 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Dec 16 12:32:02 2015 Control Channel: TLSv1, cipher TLSv1/SSLv3 ECDHE-RSA-AES256-SHA, 2048 bit RSA
Wed Dec 16 12:32:02 2015 [OpenVPN Server] Peer Connection Initiated with [AF_INET]37.205.10.90:1194
Wed Dec 16 12:32:04 2015 SENT CONTROL [OpenVPN Server]: 'PUSH_REQUEST' (status=1)
Wed Dec 16 12:32:04 2015 PUSH: Received control message: 'PUSH_REPLY,explicit-exit-notify,topology subnet,route-delay 5 30,dhcp-pre-release,dhcp-renew,dhcp-release,route-metric 101,ping 12,ping-restart 50,auth-token SESS_ID,comp-lzo yes,redirect-gateway def1,redirect-gateway bypass-dhcp,redirect-gateway autolocal,route-gateway 172.27.234.1,dhcp-option DNS 8.8.8.8,dhcp-option DNS 8.8.4.4,register-dns,block-ipv6,ifconfig 172.27.234.6 255.255.255.0'
Wed Dec 16 12:32:04 2015 Option 'explicit-exit-notify' in [PUSH-OPTIONS]:1 is ignored by previous <connection> blocks
Wed Dec 16 12:32:04 2015 Unrecognized option or missing parameter(s) in [PUSH-OPTIONS]:4: dhcp-pre-release (2.3.8)
Wed Dec 16 12:32:04 2015 Unrecognized option or missing parameter(s) in [PUSH-OPTIONS]:5: dhcp-renew (2.3.8)
Wed Dec 16 12:32:04 2015 Unrecognized option or missing parameter(s) in [PUSH-OPTIONS]:6: dhcp-release (2.3.8)
Wed Dec 16 12:32:04 2015 Unrecognized option or missing parameter(s) in [PUSH-OPTIONS]:18: register-dns (2.3.8)
Wed Dec 16 12:32:04 2015 Unrecognized option or missing parameter(s) in [PUSH-OPTIONS]:19: block-ipv6 (2.3.8)
Wed Dec 16 12:32:04 2015 OPTIONS IMPORT: timers and/or timeouts modified
Wed Dec 16 12:32:04 2015 OPTIONS IMPORT: explicit notify parm(s) modified
Wed Dec 16 12:32:04 2015 OPTIONS IMPORT: LZO parms modified
Wed Dec 16 12:32:04 2015 OPTIONS IMPORT: --ifconfig/up options modified
Wed Dec 16 12:32:04 2015 OPTIONS IMPORT: route options modified
Wed Dec 16 12:32:04 2015 OPTIONS IMPORT: route-related options modified
Wed Dec 16 12:32:04 2015 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Wed Dec 16 12:32:04 2015 ROUTE_GATEWAY 192.168.3.254/255.255.255.0 IFACE=eth0 HWADDR=00:21:cc:6a:ae:2f
Wed Dec 16 12:32:04 2015 TUN/TAP device tun0 opened
Wed Dec 16 12:32:04 2015 TUN/TAP TX queue length set to 100
Wed Dec 16 12:32:04 2015 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Wed Dec 16 12:32:04 2015 /sbin/ifconfig tun0 172.27.234.6 netmask 255.255.255.0 mtu 1500 broadcast 172.27.234.255
Wed Dec 16 12:32:09 2015 ROUTE remote_host is NOT LOCAL
Wed Dec 16 12:32:09 2015 /sbin/route add -net 37.205.10.90 netmask 255.255.255.255 gw 192.168.3.254
Wed Dec 16 12:32:09 2015 /sbin/route add -net 0.0.0.0 netmask 128.0.0.0 gw 172.27.234.1
Wed Dec 16 12:32:09 2015 /sbin/route add -net 128.0.0.0 netmask 128.0.0.0 gw 172.27.234.1
Wed Dec 16 12:32:09 2015 Initialization Sequence Completed
I'am connected now. I can access internet through the VPN, but only using IP addresses. DNS doesn't work. I think the issue is that my /etc/resolv.conf isn't updated. I'am getting
martin@local:~$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
no matter I'am connected or not.
If I manually change 127.0.1.1 to 8.8.8.8 everything is ok.
Any advice?
Thanks!