-
-
Save bvanskiver/122af6ee9c7843c89225d954165f4264 to your computer and use it in GitHub Desktop.
rem http://www.shrew.net/ | |
"C:\Program Files\ShrewSoft\VPN Client\ipsecc.exe" -r "VPN Profile Name" -u "Username" -p "Password" -a |
@sdkbotik, on Linux, the command name is ikec
, and the syntax is the same, but you need to specify -a
option to automatically connect to server. Also, in v2.2.1 in GUI I haven’t found a way to change the profile name, there the name is the server/gateway IP address. The profiles are located in ~/.ike/sites
(the profile file name is the profile name).
ikec -r "VPN Profile Name" -u "Username" -p "Password" -a
$ ikec
ii : ## : VPN Connect, ver 2.2.1
## : Copyright 2013 Shrew Soft Inc.
## : press the <h> key for help
!! : invalid parameters specified ...
>> : ikec -r "name" [ -u <user> ][ -p <pass> ][ -a ]
-r site configuration path
-u connection user name
-p connection user password
-a auto connect
Also note that this command is interactive (even when -a
option is used), therefore when you run it, it will look like this:
ii : ## : VPN Connect, ver 2.2.1
## : Copyright 2013 Shrew Soft Inc.
## : press the <h> key for help
>> : config loaded for site 'VPN Profile Name'
>> : attached to key daemon ...
>> : peer configured
>> : iskamp proposal configured
>> : esp proposal configured
>> : client configured
>> : local id configured
>> : remote id configured
>> : pre-shared key configured
ii : bringing up tunnel ...
>> : network device configured
ii : tunnel enabled
… and it keeps open the connection until q
key is pressed. You can press h
key to show the following help:
- : <c> connect
- : <d> disconnect
- : <h> help
- : <s> status
- : <q> quit
@tukusejssirs Thanks, bro!
@sdkbotik, You’re welcome. ;)
"C:\Program Files\ShrewSoft\VPN Client\ipsecc.exe" -r "VPN Profile Name" -u "Username" -p "Password" -a
Adding -a for auto connect
"C:\Program Files\ShrewSoft\VPN Client\ipsecc.exe" -r "VPN Profile Name" -u "Username" -p "Password" -a
Adding -a for auto connect
@nitinjain1005 Thanks, I'll add that!
@bvanskiver is there any way to auto close the command prompt? I tried EXIT but that didn't work.
@jkyadav, when you leave the ikec
/ipsecc
command open, you can press (I think) x
q
(I am not sure if it is I have cheched upon it.)x
or q
, I always forget it.
#!/bin/bash
qikec -r VPN -u [email protected] -p password -a
(in Linux)
@bvanskiver is there any way to auto close the command prompt? I tried EXIT but that didn't work.
@jkyadav start "" "C:\Program Files\ShrewSoft\VPN Client\ipsecc.exe" -r "VPN Profile Name" -u "Username" -p "Password" -a
@Bluscream thank you.
Hi, I'm not a tech genius is there a way I could set such connection and say it will connect @06:00 daily for 1 hour?
Would also need guidance, are the scripts above to run in a bat file or an other?
Thanks in advance
Hi, I'm not a tech genius is there a way I could set such connection and say it will connect @06:00 daily for 1 hour?
Would also need guidance, are the scripts above to run in a bat file or an other?
Thanks in advance
Windows scheduler should help you with this.
@sdkbotik thanks now I got it working
@sdkbotik thanks now I got it working
Отлично! Я рад Вам помочь.
Sorry, not sure - I only use this on Windows.