ninamo
I just set up OpenVPN on Windows 7 primarily to internet access and so far that's not happening. After reviewing numerous articles and posts, I was able to get OpenVPN working and change the network from Unidentified, Public, to Network 4, Home Network but now having spent many, many hours trying to find out why that Network still shows No Internet access and not finding a good solution, I decided to post here hoping that someone can help.
I will preface the following by saying that I definitely have OpenVPN set up as Admin so the failed message you see in the log file below have nothing to do with that.
Here is the log file:
Sun May 11 15:38:24 2014 Need hold release from management interface, waiting...
Sun May 11 15:38:25 2014 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:25341
Sun May 11 15:38:25 2014 MANAGEMENT: CMD 'state on'
Sun May 11 15:38:25 2014 MANAGEMENT: CMD 'log all on'
Sun May 11 15:38:25 2014 MANAGEMENT: CMD 'hold off'
Sun May 11 15:38:25 2014 MANAGEMENT: CMD 'hold release'
Sun May 11 15:38:25 2014 NOTE: your local LAN uses the extremely common subnet address 192.168.0.x or 192.168.1.x. Be aware that this might create routing conflicts if you connect to the VPN server from public locations such as internet cafes that use the same subnet.
Sun May 11 15:38:25 2014 Diffie-Hellman initialized with 1024 bit key
Sun May 11 15:38:25 2014 Socket Buffers: R=[8192->8192] S=[8192->8192]
Sun May 11 15:38:25 2014 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Sun May 11 15:38:25 2014 MANAGEMENT: >STATE:1399815505,ASSIGN_IP,,10.8.0.1,
Sun May 11 15:38:25 2014 open_tun, tt->ipv6=0
Sun May 11 15:38:25 2014 TAP-WIN32 device [Local Area Connection 7] opened: \\.\Global\{EC0CE05C-9FB8-46DB-BEE0-6717B3184476}.tap
Sun May 11 15:38:25 2014 TAP-Windows Driver Version 9.9
Sun May 11 15:38:25 2014 Notified TAP-Windows driver to set a DHCP IP/netmask of 10.8.0.1/255.255.255.252 on interface {EC0CE05C-9FB8-46DB-BEE0-6717B3184476} [DHCP-serv: 10.8.0.2, lease-time: 31536000]
Sun May 11 15:38:25 2014 Sleeping for 2 seconds...
Sun May 11 15:38:27 2014 NOTE: FlushIpNetTable failed on interface [32] {EC0CE05C-9FB8-46DB-BEE0-6717B3184476} (status=5) : Access is denied.
Sun May 11 15:38:27 2014 MANAGEMENT: >STATE:1399815507,ADD_ROUTES,,,
Sun May 11 15:38:27 2014 C:\Windows\system32\route.exe ADD 10.8.0.0 MASK 255.255.255.0 10.8.0.2
Sun May 11 15:38:27 2014 env_block: add PATH=C:\Windows\System32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
Sun May 11 15:38:27 2014 ERROR: Windows route add command failed: returned error code 1
Sun May 11 15:38:27 2014 UDPv4 link local (bound): [undef]
Sun May 11 15:38:27 2014 UDPv4 link remote: [undef]
Sun May 11 15:38:27 2014 MULTI: multi_init called, r=256 v=256
Sun May 11 15:38:27 2014 IFCONFIG POOL: base=10.8.0.4 size=62, ipv6=0
Sun May 11 15:38:27 2014 IFCONFIG POOL LIST
Sun May 11 15:38:27 2014 Initialization Sequence Completed
Sun May 11 15:38:27 2014 MANAGEMENT: >STATE:1399815507,CONNECTED,SUCCESS,10.8.0.1,
And here is my config:
port 1194
proto udp
dev tun
ca "C:\\Program Files\\OpenVPN\\config\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\config\\server.crt"
key "C:\\Program Files\\OpenVPN\\config\\server.key"
dh "C:\\Program Files\\OpenVPN\\config\\dh1024.pem"
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 3
push "route-metric 512"
push "route 0.0.0.0 0.0.0.0"
route-method exe
route-delay 2
I just need to get the Network 4 (Local Area Connection 7) to have internet access. I would have thought it wouldn't be too hard but it's turning out to be a real headache. If anyone can help, I would be most grateful.
ninamo
I am using the GUI but both are set up as Admin.
Whatever I did yesterday seems to have resolved the failure issues. Here is latest log:
Mon May 12 07:17:55 2014 OpenVPN 2.3.4 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [PKCS11] [IPv6] built on May 2 2014
Mon May 12 07:17:55 2014 library versions: OpenSSL 1.0.1g 7 Apr 2014, LZO 2.05
Enter Management Password:
Mon May 12 07:17:55 2014 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:25341
Mon May 12 07:17:55 2014 Need hold release from management interface, waiting...
Mon May 12 07:17:55 2014 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:25341
Mon May 12 07:17:55 2014 MANAGEMENT: CMD 'state on'
Mon May 12 07:17:55 2014 MANAGEMENT: CMD 'log all on'
Mon May 12 07:17:55 2014 MANAGEMENT: CMD 'hold off'
Mon May 12 07:17:55 2014 MANAGEMENT: CMD 'hold release'
Mon May 12 07:17:55 2014 NOTE: your local LAN uses the extremely common subnet address 192.168.0.x or 192.168.1.x. Be aware that this might create routing conflicts if you connect to the VPN server from public locations such as internet cafes that use the same subnet.
Mon May 12 07:17:55 2014 Diffie-Hellman initialized with 1024 bit key
Mon May 12 07:17:55 2014 Socket Buffers: R=[8192->8192] S=[8192->8192]
Mon May 12 07:17:55 2014 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Mon May 12 07:17:55 2014 MANAGEMENT: >STATE:1399871875,ASSIGN_IP,,10.8.0.1,
Mon May 12 07:17:55 2014 open_tun, tt->ipv6=0
Mon May 12 07:17:55 2014 TAP-WIN32 device [Local Area Connection 7] opened: \\.\Global\{EC0CE05C-9FB8-46DB-BEE0-6717B3184476}.tap
Mon May 12 07:17:55 2014 TAP-Windows Driver Version 9.9
Mon May 12 07:17:55 2014 Notified TAP-Windows driver to set a DHCP IP/netmask of 10.8.0.1/255.255.255.252 on interface {EC0CE05C-9FB8-46DB-BEE0-6717B3184476} [DHCP-serv: 10.8.0.2, lease-time: 31536000]
Mon May 12 07:17:55 2014 Sleeping for 2 seconds...
Mon May 12 07:17:57 2014 Successful ARP Flush on interface [32] {EC0CE05C-9FB8-46DB-BEE0-6717B3184476}
Mon May 12 07:17:57 2014 MANAGEMENT: >STATE:1399871877,ADD_ROUTES,,,
Mon May 12 07:17:57 2014 C:\Windows\system32\route.exe ADD 10.8.0.0 MASK 255.255.255.0 10.8.0.2
Mon May 12 07:17:57 2014 env_block: add PATH=C:\Windows\System32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
Mon May 12 07:17:57 2014 UDPv4 link local (bound): [undef]
Mon May 12 07:17:57 2014 UDPv4 link remote: [undef]
Mon May 12 07:17:57 2014 MULTI: multi_init called, r=256 v=256
Mon May 12 07:17:57 2014 IFCONFIG POOL: base=10.8.0.4 size=62, ipv6=0
Mon May 12 07:17:57 2014 IFCONFIG POOL LIST
Mon May 12 07:17:57 2014 Initialization Sequence Completed
Mon May 12 07:17:57 2014 MANAGEMENT: >STATE:1399871877,CONNECTED,SUCCESS,10.8.0.1,
However, connecting to OpenVPN has not been my problem, so that hasn't solved anything. My problem is that I can't get Internet Access on the Network Connection [Local Area Connection 7] .
I got a Dyndns account and domain name when I was setting up OpenVPN as it suggested I do. However both OpenVPN and Dyn.com are woefully lacking in explaining how to properly set this up and I feel now that this is where the problem may lie. When I set up the dyn domain/host, the IP defaults to my current IP location which is from my ISP. Changing this to the OpenVPN IP seems to have no affect - it doesn't change it in the Dyn Updater, or perhaps I'm not waiting long enough. At any rate, it is very unclear if I should be using my OpenVPN IP or an IP from my router or the default of the ISP IP. Or if this is, indeed, why I'm unable to get the network connection to have internet access.
ninamo
Okay, after a lot more reading of various articles, including the ones you linked to, I did a few more things, like adding port forwarding. But more importantly I realized that it is with the client, rather than the server, that I need to actually connect to the internet. I hadn't even tried to connect the client since I've gotten the server running properly.
So, I tried to connect to the client and got, among other things, the message: "Cannot resolve host address: xxx.xxx.com: The requested name is valid, but no data of the requested type was found."
Looking further into this I found out how to find out what Windows sees as the IP for xxx.xxx.com by using nslookup. What I found was that Windows sees the IP as 192.168.1.254 which is the address of my router. The IP listed as the IPv4 in dyndns is from my ISP and is completely different.
So what have I done wrong?
ninamo
My server config is listed above.
Here is my client config:
client
dev tun
proto udp
remote xxx.xxx.com 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca "C:\\Program Files\\OpenVPN\\config\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\config\\this-client.crt"
key "C:\\Program Files\\OpenVPN\\config\\this-client.key"
ns-cert-type server
comp-lzo
verb 3