Community Support Forum
 
  OpenVPN.net  •  Forum Index  •  FAQ  

It is currently Thu Apr 17, 2014 9:28 pm




Post new topic Reply to topic  [ 3 posts ] 
 Openvpn with windows 7 client 
Author Message
 Post subject: Openvpn with windows 7 client
PostPosted: Fri Mar 23, 2012 8:46 pm 
OpenVpn Newbie

Joined: Fri Mar 23, 2012 8:04 pm
Posts: 6
I have openvpn server running on my router at using using DD-WRT distribution, everything was working fine when I had winxp on my laptop.
After switching to win7 I noticed that I can't use home network at default gateway anymore checking with http://www.whatismyip.com but hotel network.

I noticed that in the client windows I get an error message when openvpn trying to push route:
Code:
ERROR: Windows route add command failed [adaptive]: returned error code 1
C:\WINDOWS\system32\route.exe ADD 0.0.0.0 MASK 128.0.0.0 192.168.1.1
ROUTE: route addition failed using CreateIpForwardEntry: Access is denied.   [status=5 if_index=23]
Route addition via IPAPI failed [adaptive]
Route addition fallback to route.exe
The requested operation requires elevation.


I decided to start openvpngui as Administrator this time I didn't get the error message any more the the gateway was pushed with incorrect subnet mask.

Code:
C:\WINDOWS\system32\route.exe ADD "my home ip address" MASK 255.255.255.255 192.168.72.1
ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=20 and dwForwardType=4
Route addition via IPAPI succeeded [adaptive]
C:\WINDOWS\system32\route.exe ADD 0.0.0.0 MASK 128.0.0.0 192.168.1.1
ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=30 and dwForwardType=4
Route addition via IPAPI succeeded [adaptive]
C:\WINDOWS\system32\route.exe ADD 128.0.0.0 MASK 128.0.0.0 192.168.1.1
ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=30 and dwForwardType=4
Route addition via IPAPI succeeded [adaptive]
Initialization Sequence Completed


The mask being pushed is 128.0.0.1 instead of 0.0.0.0 why?

My router openvpn server configuration is:
Code:
mode server
tls-server
port 1194
#proto udp
proto tcp-server
dev tap0
ca /tmp/openvpn/ca.crt
cert /tmp/openvpn/cert.pem
key /tmp/openvpn/key.pem
dh /tmp/openvpn/dh.pem
server-bridge 192.168.1.1 255.255.255.0 192.168.1.100 192.168.1.105
push "redirect-gateway def1"
push "dhcp-option DNS 192.168.1.1"
management localhost 5002
client-to-client
daemon
keepalive 10 120
tls-auth /tmp/openvpn/ta.key 0
#cipher AES-256-CBC
cipher BF-CBC
comp-lzo
persist-key
persist-tun
verb 1


My Startup script on the server is
Code:
openvpn --mktun --dev tap0
brctl addif br0 tap0
ifconfig tap0 0.0.0.0 promisc up


My firewall configuration is
Code:
iptables -t nat -I PREROUTING -p tcp --dport 1194 -d 192.168.1.1 -j ACCEPT
iptables -I INPUT -p tcp --dport 1194 -j ACCEPT
iptables -t nat -I PREROUTING -p tcp -d `nvram get wan_ipaddr` --dport 1194 -j ACCEPT


Any help will be appreciated


Offline
 Profile  
 
 Post subject: Re: Openvpn with windows 7 client
PostPosted: Fri Mar 23, 2012 9:54 pm 
Forum Team
User avatar

Joined: Fri Aug 20, 2010 2:57 pm
Posts: 2702
Location: Amsterdam
Quote:
The mask being pushed is 128.0.0.1 instead of 0.0.0.0 why?


this is normal behavior when using 'redirect-gateway def1' - read the man page for details.


As for not being able to access your home network: that all depends on routing on the client side. What does the routing table look like after the VPN connection is established?

_________________
JJK / Jan Just Keijser
http://www.nikhef.nl/~janjust/vpn/OpenVPN2-Cookbook/index.html
http://www.nikhef.nl/~janjust/vpn/OpenVPN2-Cookbook/errata.html


Offline
 Profile  
 
 Post subject: Re: Openvpn with windows 7 client
PostPosted: Mon Mar 26, 2012 12:23 pm 
OpenVpn Newbie

Joined: Fri Mar 23, 2012 8:04 pm
Posts: 6
After I started it as Administrator and rebooted everything looks good.


Offline
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


 Who is online 

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


phpBB SEO
[ Time : 0.190s | 12 Queries | GZIP : On ]

 
Index  |  FAQ


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group