extra routing with Windows 7 and User Access Controls
Posted: Fri Sep 02, 2011 8:12 pm
I was looking around and found someone on this forum had scripts running on up and down so I was thinking I could use it to add and remove routes from the routing table. Much to my dismay it was failing because of User Access Controls. I don't want to disable User Access Controls. Is there a way to add routes to my client computers.
I have push route but that doesn't seem to work or even add all the arguments I want.
situation I have my servers inside address at
192.168.0.2
and my router at 192.168.0.1
My server config looks as follows
port 1194
proto udp
dev tap
dev-node Mytap
ca ca.crt
cert server.crt
dh dh1024.pem
server-bridge
push route 192.168.1.0 255.255.255.0 192.168.0.1
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 3
the documentation for push route only shows two arguments but I wanted to give a gateway. Either way it seems not to work. I tried the following for my client's config
client
dev tap
dev-node Mytap
proto udp
remote serverdnsname 1194
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
script-security 2
up "connect_inside_routes.bat"
down "disconnect_inside_routes.bat"
and as I stated connect_inside_routes.bat needs to be run as administrator and I can't figure out how to get openvpn to get that privilege to run it as such.
connect_inside_routes.bat looks as follows
route add 192.168.1.0 mask 255.255.255.0 192.168.0.1
rem remark so that the last exiting command returns a zero or the vpn connection fails too.
I have the file in openvpn's config directory and it appears to run.
because if I remove the last line it failes the vpn connection as stated.
So is there other configurations I can do to get more routes?
What is odd is my dhcp server should be giving the default gateway as 192.168.0.1 but it doesn't seem to.
I have push route but that doesn't seem to work or even add all the arguments I want.
situation I have my servers inside address at
192.168.0.2
and my router at 192.168.0.1
My server config looks as follows
port 1194
proto udp
dev tap
dev-node Mytap
ca ca.crt
cert server.crt
dh dh1024.pem
server-bridge
push route 192.168.1.0 255.255.255.0 192.168.0.1
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 3
the documentation for push route only shows two arguments but I wanted to give a gateway. Either way it seems not to work. I tried the following for my client's config
client
dev tap
dev-node Mytap
proto udp
remote serverdnsname 1194
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
script-security 2
up "connect_inside_routes.bat"
down "disconnect_inside_routes.bat"
and as I stated connect_inside_routes.bat needs to be run as administrator and I can't figure out how to get openvpn to get that privilege to run it as such.
connect_inside_routes.bat looks as follows
route add 192.168.1.0 mask 255.255.255.0 192.168.0.1
rem remark so that the last exiting command returns a zero or the vpn connection fails too.
I have the file in openvpn's config directory and it appears to run.
because if I remove the last line it failes the vpn connection as stated.
So is there other configurations I can do to get more routes?
What is odd is my dhcp server should be giving the default gateway as 192.168.0.1 but it doesn't seem to.