Down script to fix route issue
Posted: Fri Dec 30, 2011 3:07 pm
Am using Openvpn client on windows 7 laptop. After I disconnect from the vpn, my internet no longer works, even though my wireless is still connected.
I think this is a route issue... the route table in windows must not be refreshing. So I am trying to make a down batch file that can fix this that runs on disconnect of the vpn client. At the moment I can get a batch file to run but if I even just put
If I double click on the batch file it works, but it isn't working when the Openvpn client calls it. My client config just has:
in it.
I guess I would like to know what to add to the batch file so that upon running it, the route table is deleted and then restored. Or alternatively, the route table is delete and then the wireless connection is restarted. However the first option seems better, to just restore the working route table before the vpn was started.
Thanks for help.
I think this is a route issue... the route table in windows must not be refreshing. So I am trying to make a down batch file that can fix this that runs on disconnect of the vpn client. At the moment I can get a batch file to run but if I even just put
in it, I get:@echo off
route print
Code: Select all
'route' is not recognized as an internal or external command,
operable program or batch file.
Fri Dec 30 23:01:24 2011 WARNING: Failed running command (--up/--down): returned error code 1
Code: Select all
script-security 2
down down.cmd
I guess I would like to know what to add to the batch file so that upon running it, the route table is deleted and then restored. Or alternatively, the route table is delete and then the wireless connection is restarted. However the first option seems better, to just restore the working route table before the vpn was started.
Thanks for help.