I have a VPS running CentOS6 on OpenVZ, and I want to install a VPN for browsing the internet anonymously from home. I have windows 7 on my home PC. I have little experience with servers and stuff.
After a shitload of work I finally got a working openvpn install and I could connect successfully to the server from my home PC. Unfortunately, this caused the internet to not work at all instead of routing it through the server. What did I do wrong?
I have tried disabling firewalls both on my VPS and home PC.
My server conf file is identical to the sample config file except these lines:
dev tap
;dev tun
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
My client log looks like this:
Tue Jun 19 18:51:47 2012 OpenVPN 2.3-alpha1 Win32-MSVC++ [SSL (OpenSSL)] [LZO2] [PF_INET6] [IPv6 payload 20110522-1 (2.2.0)] built on Feb 21 2012
Enter Management Password:
Tue Jun 19 18:51:47 2012 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.10:25340
Tue Jun 19 18:51:47 2012 Need hold release from management interface, waiting...
Tue Jun 19 18:51:48 2012 MANAGEMENT: Client connected from [AF_INET]127.0.0.10:25340
Tue Jun 19 18:51:48 2012 MANAGEMENT: CMD 'state on'
Tue Jun 19 18:51:48 2012 MANAGEMENT: CMD 'log all on'
Tue Jun 19 18:51:48 2012 MANAGEMENT: CMD 'hold off'
Tue Jun 19 18:51:48 2012 MANAGEMENT: CMD 'hold release'
Tue Jun 19 18:51:48 2012 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Tue Jun 19 18:51:48 2012 Socket Buffers: R=[8192->8192] S=[8192->8192]
Tue Jun 19 18:51:48 2012 UDPv4 link local: [undef]
Tue Jun 19 18:51:48 2012 UDPv4 link remote: [AF_INET]78.129.251.211:1194
Tue Jun 19 18:51:48 2012 MANAGEMENT: >STATE:1340124708,WAIT,,,
Tue Jun 19 18:51:48 2012 MANAGEMENT: >STATE:1340124708,AUTH,,,
Tue Jun 19 18:51:48 2012 TLS: Initial packet from [AF_INET]78.129.251.211:1194, sid=0a86fc4a 5cb05c46
Tue Jun 19 18:51:48 2012 VERIFY OK: depth=1, C=NO, ST=HO, L=STRUSSHAMN, O=VPN-grix, CN=grix, emailAddress=gitlem@lavabit.com
Tue Jun 19 18:51:48 2012 VERIFY OK: nsCertType=SERVER
Tue Jun 19 18:51:48 2012 VERIFY OK: depth=0, C=NO, ST=HO, O=VPN-grix, CN=grixserver, emailAddress=gitlem@lavabit.com
Tue Jun 19 18:51:49 2012 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Tue Jun 19 18:51:49 2012 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Tue Jun 19 18:51:49 2012 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Tue Jun 19 18:51:49 2012 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Tue Jun 19 18:51:49 2012 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 1024 bit RSA
Tue Jun 19 18:51:49 2012 [grixserver] Peer Connection Initiated with [AF_INET]78.129.251.211:1194
Tue Jun 19 18:51:50 2012 MANAGEMENT: >STATE:1340124710,GET_CONFIG,,,
Tue Jun 19 18:51:52 2012 SENT CONTROL [grixserver]: 'PUSH_REQUEST' (status=1)
Tue Jun 19 18:51:52 2012 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1,dhcp-option DNS 8.8.8.8,route-gateway 10.8.0.1,ping 10,ping-restart 120,ifconfig 10.8.0.2 255.255.255.0'
Tue Jun 19 18:51:52 2012 OPTIONS IMPORT: timers and/or timeouts modified
Tue Jun 19 18:51:52 2012 OPTIONS IMPORT: --ifconfig/up options modified
Tue Jun 19 18:51:52 2012 OPTIONS IMPORT: route options modified
Tue Jun 19 18:51:52 2012 OPTIONS IMPORT: route-related options modified
Tue Jun 19 18:51:52 2012 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Tue Jun 19 18:51:52 2012 ROUTE_GATEWAY 192.168.1.1/255.255.255.0 I=33 HWADDR=54:04:a6:de:e0:8d
Tue Jun 19 18:51:52 2012 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Tue Jun 19 18:51:52 2012 MANAGEMENT: >STATE:1340124712,ASSIGN_IP,,10.8.0.2,
Tue Jun 19 18:51:52 2012 open_tun, tt->ipv6=0
Tue Jun 19 18:51:52 2012 TAP-WIN32 device [OpenVPN_Tap] opened: \\.\Global\{FD8ADB21-259A-446F-B662-CAAF8013B113}.tap
Tue Jun 19 18:51:52 2012 TAP-Win32 Driver Version 9.9
Tue Jun 19 18:51:52 2012 Notified TAP-Win32 driver to set a DHCP IP/netmask of 10.8.0.2/255.255.255.0 on interface {FD8ADB21-259A-446F-B662-CAAF8013B113} [DHCP-serv: 10.8.0.0, lease-time: 31536000]
Tue Jun 19 18:51:52 2012 Successful ARP Flush on interface [15] {FD8ADB21-259A-446F-B662-CAAF8013B113}
Tue Jun 19 18:51:57 2012 TEST ROUTES: 1/1 succeeded len=0 ret=1 a=0 u/d=up
Tue Jun 19 18:51:57 2012 C:\Windows\system32\route.exe ADD 78.129.251.211 MASK 255.255.255.255 192.168.1.1
Tue Jun 19 18:51:57 2012 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=25 and dwForwardType=4
Tue Jun 19 18:51:57 2012 Route addition via IPAPI succeeded [adaptive]
Tue Jun 19 18:51:57 2012 C:\Windows\system32\route.exe ADD 0.0.0.0 MASK 128.0.0.0 10.8.0.1
Tue Jun 19 18:51:57 2012 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=30 and dwForwardType=4
Tue Jun 19 18:51:57 2012 Route addition via IPAPI succeeded [adaptive]
Tue Jun 19 18:51:57 2012 C:\Windows\system32\route.exe ADD 128.0.0.0 MASK 128.0.0.0 10.8.0.1
Tue Jun 19 18:51:57 2012 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=30 and dwForwardType=4
Tue Jun 19 18:51:57 2012 Route addition via IPAPI succeeded [adaptive]
Tue Jun 19 18:51:57 2012 Initialization Sequence Completed
Tue Jun 19 18:51:57 2012 MANAGEMENT: >STATE:1340124717,CONNECTED,SUCCESS,10.8.0.2,78.129.251.211