Hi,
Problem: Windows client has no access to the internet when connected to linux openvpn server. However, he can reach the linux server with ip, but not with the hostname.
Target: The Windows client has access to the Internet during the VPN connection and can reach the server with its hostname.
server.conf
port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key # This file should be kept secret
dh dh2048.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "route 10.8.0.0 255.255.255.0"
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"
keepalive 10 120
comp-lzo
;user nobody
;group nogroup
persist-key
persist-tun
status openvpn-status.log
verb 3
client.ovpn
client
dev tun
proto udp
remote *.*.*.* 35235
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client.crt
key client.key
ns-cert-type server
comp-lzo
verb 3
iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT all -- 10.8.0.0/24 anywhere
REJECT all -- anywhere anywhere reject-with icmp-port-unreachable
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Client log
Sat Aug 23 17:23:00 2014 OpenVPN 2.3.4 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [PKCS11] [IPv6] built on Jun 5 2014
Sat Aug 23 17:23:00 2014 library versions: OpenSSL 1.0.1h 5 Jun 2014, LZO 2.05
Sat Aug 23 17:23:00 2014 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:25340
Sat Aug 23 17:23:00 2014 Need hold release from management interface, waiting...
Sat Aug 23 17:23:00 2014 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:25340
Sat Aug 23 17:23:00 2014 MANAGEMENT: CMD 'state on'
Sat Aug 23 17:23:00 2014 MANAGEMENT: CMD 'log all on'
Sat Aug 23 17:23:00 2014 MANAGEMENT: CMD 'hold off'
Sat Aug 23 17:23:00 2014 MANAGEMENT: CMD 'hold release'
Sat Aug 23 17:23:01 2014 Socket Buffers: R=[65536->65536] S=[65536->65536]
Sat Aug 23 17:23:01 2014 UDPv4 link local: [undef]
Sat Aug 23 17:23:01 2014 UDPv4 link remote: [AF_INET]*.*.*.*:35235
Sat Aug 23 17:23:01 2014 MANAGEMENT: >STATE:1408807381,WAIT,,,
Sat Aug 23 17:23:01 2014 MANAGEMENT: >STATE:1408807381,AUTH,,,
Sat Aug 23 17:23:01 2014 TLS: Initial packet from [AF_INET]*.*.*.*:35235, sid=38bf49d9 44dac45e
Sat Aug 23 17:23:01 2014 VERIFY OK: (deleted)
Sat Aug 23 17:23:01 2014 VERIFY OK: nsCertType=SERVER
Sat Aug 23 17:23:01 2014 VERIFY OK: (deleted)
Sat Aug 23 17:23:01 2014 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Sat Aug 23 17:23:01 2014 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Sat Aug 23 17:23:01 2014 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Sat Aug 23 17:23:01 2014 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Sat Aug 23 17:23:01 2014 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 2048 bit RSA
Sat Aug 23 17:23:01 2014 [server] Peer Connection Initiated with [AF_INET]*.*.*.*:35235
Sat Aug 23 17:23:03 2014 MANAGEMENT: >STATE:1408807383,GET_CONFIG,,,
Sat Aug 23 17:23:04 2014 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
Sat Aug 23 17:23:04 2014 PUSH: Received control message: 'PUSH_REPLY,route 10.8.0.0 255.255.255.0,redirect-gateway def1 bypass-dhcp,dhcp-option DNS 208.67.222.222,dhcp-option DNS 208.67.220.220,route 10.8.0.1,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.6 10.8.0.5'
Sat Aug 23 17:23:04 2014 OPTIONS IMPORT: timers and/or timeouts modified
Sat Aug 23 17:23:04 2014 OPTIONS IMPORT: --ifconfig/up options modified
Sat Aug 23 17:23:04 2014 OPTIONS IMPORT: route options modified
Sat Aug 23 17:23:04 2014 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Sat Aug 23 17:23:04 2014 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Sat Aug 23 17:23:04 2014 MANAGEMENT: >STATE:1408807384,ASSIGN_IP,,10.8.0.6,
Sat Aug 23 17:23:04 2014 open_tun, tt->ipv6=0
Sat Aug 23 17:23:04 2014 TAP-WIN32 device [LAN-verbinding 3] opened: \\.\Global\{957E13DA-1BB0-4B62-93F2-82F8317BACDD}.tap
Sat Aug 23 17:23:04 2014 TAP-Windows Driver Version 9.9
Sat Aug 23 17:23:04 2014 Notified TAP-Windows driver to set a DHCP IP/netmask of 10.8.0.6/255.255.255.252 on interface {957E13DA-1BB0-4B62-93F2-82F8317BACDD} [DHCP-serv: 10.8.0.5, lease-time: 31536000]
Sat Aug 23 17:23:04 2014 NOTE: FlushIpNetTable failed on interface [7] {957E13DA-1BB0-4B62-93F2-82F8317BACDD} (status=1168) : Kan element niet vinden.
Sat Aug 23 17:23:09 2014 TEST ROUTES: 3/3 succeeded len=2 ret=1 a=0 u/d=up
Sat Aug 23 17:23:09 2014 C:\WINDOWS\system32\route.exe ADD *.*.*.* MASK 255.255.255.255 192.168.1.1
Sat Aug 23 17:23:09 2014 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=25 and dwForwardType=4
Sat Aug 23 17:23:09 2014 Route addition via IPAPI succeeded [adaptive]
Sat Aug 23 17:23:09 2014 C:\WINDOWS\system32\route.exe ADD 192.168.1.1 MASK 255.255.255.255 192.168.1.1 IF 3
Sat Aug 23 17:23:09 2014 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=25 and dwForwardType=4
Sat Aug 23 17:23:09 2014 Route addition via IPAPI succeeded [adaptive]
Sat Aug 23 17:23:09 2014 C:\WINDOWS\system32\route.exe ADD 0.0.0.0 MASK 128.0.0.0 10.8.0.5
Sat Aug 23 17:23:09 2014 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=10 and dwForwardType=4
Sat Aug 23 17:23:09 2014 Route addition via IPAPI succeeded [adaptive]
Sat Aug 23 17:23:09 2014 C:\WINDOWS\system32\route.exe ADD 128.0.0.0 MASK 128.0.0.0 10.8.0.5
Sat Aug 23 17:23:09 2014 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=10 and dwForwardType=4
Sat Aug 23 17:23:09 2014 Route addition via IPAPI succeeded [adaptive]
Sat Aug 23 17:23:09 2014 MANAGEMENT: >STATE:1408807389,ADD_ROUTES,,,
Sat Aug 23 17:23:09 2014 C:\WINDOWS\system32\route.exe ADD 10.8.0.0 MASK 255.255.255.0 10.8.0.5
Sat Aug 23 17:23:10 2014 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=10 and dwForwardType=4
Sat Aug 23 17:23:10 2014 Route addition via IPAPI succeeded [adaptive]
Sat Aug 23 17:23:10 2014 C:\WINDOWS\system32\route.exe ADD 10.8.0.1 MASK 255.255.255.255 10.8.0.5
Sat Aug 23 17:23:10 2014 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=10 and dwForwardType=4
Sat Aug 23 17:23:10 2014 Route addition via IPAPI succeeded [adaptive]
Sat Aug 23 17:23:10 2014 Initialization Sequence Completed
Sat Aug 23 17:23:10 2014 MANAGEMENT: >STATE:1408807390,CONNECTED,SUCCESS,10.8.0.6,*.*.*.*
I have used this tutorial when setting up the vpn:
http://lintut.com/install-openvpn-on-ubuntu-server/
On this forum I have found many similar problems from which I have tried different solutions, but with no result.
Do you have any idea what I could do?