General discussion

Locked

Automate FTP and VPN

By mark_bondy ·
How can I write a scipt to logon to a VPN, FTP some files, and logoff the VPN? I'm using a Windows NT machine.

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Automate FTP and VPN

by RCC In reply to Automate FTP and VPN

You could use a combination ping (if you have dial-on demand enable), sleep (from RK)and ftp commands. You can then set a disconnect on no activity option.
If you tell us how is the connection setup (permanently linked, dial-up, etc) I'm sure we can help further.
Regards,
Radu

Collapse -

Automate FTP and VPN

by mark_bondy In reply to Automate FTP and VPN

I'm using a dial-up. I'm not sure how to use ping and sleep with the VPN. I think an example script would help.

Thanks, Mark

Collapse -

Automate FTP and VPN

by RCC In reply to Automate FTP and VPN

Are you familliar with setting dial-up networking on NT 4? If you go to Program Files/Accessories, you will find Dial-up. You can create an entry that dials your Internet Provider and also an entry for the VPN. Set these two to dial and login automatically (you will have to set the credentials for them first time)
Now create a .cmd file that looks like this:
ping your_vpnserver_IP (this should trigger the Internet connection)
sleep 60 (wait 1 minute)
ping your_vpn_Internal_IP (this should trigger the VPN dial-up)
sleep 60 (wait 1 minute)
ftp -i -d -s:vpn.ftp VPN_Host (this starts the FTP session in automated mode to your VPN_HOST and gets the command input from the vpn.ftp file - you need to create this.

The Vpn.ftp file shouldlook something like this (you can consult NT-Ftp help for details):
your_ftp_login
your_ftp_password
prompt off
cd remote_directory
lcd local_directory
type binary (or ascii)
mput *.exe (for uploading all your .exe files)
y (to confirm transfer)
quit
exit

If you set the default inactivity time-out for dial-in properties (Internet connection), you can automatically disconnect when finished)
I hope this helps. I can assist you further if you run into problems.
Regards,
Radu

Collapse -

Automate FTP and VPN

by RCC In reply to Automate FTP and VPN

sleep utility is from the NT 4 resource kit, I can e-mail it to you

Collapse -

Automate FTP and VPN

by RCC In reply to Automate FTP and VPN

also have a look at http://www.bintec.de/download/brick/doku/swref/vpn.pdf , you may find some usefull info

Collapse -

Automate FTP and VPN

by mark_bondy In reply to Automate FTP and VPN

Poster rated this answer

Collapse -

Automate FTP and VPN

by mark_bondy In reply to Automate FTP and VPN

This question was closed by the author

Back to Web Development Forum
7 total posts (Page 1 of 1)  

Related Discussions

Related Forums