Hello,
I setup simple OpenVPN server on the Windows Server 2008 R2 64bit according to the
https://forums.openvpn.net/topic7806.html.
I want to redirect all traffic from my client to the VPN.
My Openvpn client connects successfully in Windows 7 but I can't connect internet through VPN.
here is the server config:
port 1194
proto tcp
dev tun
ca ca.crt
cert server.crt
key server.key
server 10.8.0.0 255.255.255.0
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 208.98.0.7"
dh dh1024.pem
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 3
keepalive 10 120
here is the client config :
client
pull
dev tun
proto tcp
remote A.B.C.D 1194
ca ca.crt
cert client1.crt
key client1.key
resolv-retry infinite
nobind
persist-key
persist-tun
ns-cert-type server
comp-lzo
verb 3
I have setup two more settings on the server.
Network and Sharing Center->Local Area Connection->Properties->Sharing->tick "Allow other network users to connect through this computer's Internet connection", from the drop-down list select "Local Area Connection 2"(it's TAP connection)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters: IPEnableRouter=1
I am running the client in administrator mode but there is no change.
I have tested both openvpn-install-2.3.2-I003-x86_64 and openvpn-install-2.2.2 on the server.
My client says:
C:\Windows\system32>ipconfig
Ethernet adapter Local Area Connection 2:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::9b5:aebf:b837:cb56%18
IPv4 Address. . . . . . . . . . . : 10.8.0.6
Subnet Mask . . . . . . . . . . . : 255.255.255.252
Default Gateway . . . . . . . . . :
Here's routing table (10.50.1.x is my LAN)
C:\Windows\system32>route print
...
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 10.50.1.254 10.50.1.10 21
0.0.0.0 128.0.0.0 10.8.0.5 10.8.0.6 30
10.8.0.1 255.255.255.255 10.8.0.5 10.8.0.6 30
10.8.0.4 255.255.255.252 On-link 10.8.0.6 286
My questions are:
1) Why default gateway of my TAP connection is empty?
When I test client in Windows XP with same configuration, it correctly shows 10.8.0.5 as default gateway
2) If I remove def1 in the server configuration, client gets default gateway as 10.8.0.5 correctly
3) When I ping
http://www.google.com both for 1) and 2) after vpn connect, it fails.
Hope expert's help.