Python Script to dial a VPN connection, automate VPN routing table updates.

Joel Lucsy jjlucsy at concentric.net
Fri Mar 23 16:10:02 EST 2001


try "rasdial /?" at a command prompt

--
Joel Lucsy (jjlucsy at concentric.net)

"Warren Postma" <warren-postma at home.com> wrote in message
news:FCNu6.66711$A6.13912607 at news4.rdc1.on.home.com...
> Sorry for the nearly-off-topic nature of this post, but ....
>
> I work from home now, and there's something in Windows 2000 that's
> annoyingly manual:
>
> I have a permanent internet connection via @home cable modem, and I "dial"
> through that to create a VPN connection to the office.  The problems are
> two:
>
> (1) Windows won't accept or save my userid, password and the domain name,
so
> I have to enter it manually.
>
> (2) After connecting, I have two default gateways in my routing tables
> (ROUTE PRINT) and I need to update it so only the traffic that is destined
> to the office goes through that interface.  The IP addresses I get given
are
> different each time, making a batch file insufficient, so voila, a perfect
> use for python.
>
> So after solving #2 above in Python, I wondered, does anyone know how, in
> Python win32 extensions, one might dial an RAS connection, and if it's
> possible to do so  through the win32 API somewhere or through COM? Then I
> could solve #1 above as well.
>
> Anyone else think this might make a nice little Python applet if I build
in
> some more VPN/RAS stuff and maybe even Gui-fy it a bit in wxPython or
> tkInter.
>
> Warren Postma
>
>
>
>






More information about the Python-list mailing list