Thanks to André P. for his article so I was able to make this guide: https://www.debinux.de/2014/01/ubuntu-server-cli-shrew-soft-vpn-client/
It is a bit tricky to use IKE without the GUI under Debian. I found a solution, how you can do this:
aptitude install ike
- Create the Folder ~/.ike/sites
- Take your Shrewsoft VPN Configuration File (.vpn) and put it into ~/.ike/sites and remove the file extension (for example rename test.vpn to test)
- To test the configuration, use the following command:
ikec -r <name of the configuration file> -u <user> -p <password> -a
- Now it is possible to use the tunnel
- Install Screen
aptitude install screen
- Create INIT-Script
vim /etc/init.d/ikec
You have to replace the following fields with your values: SESSIONNAME, SITENAME, VPNUSER und VPNPASS
#!/bin/bash
### BEGIN INIT INFO
# Provides: ikec
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Start ikec
### END INIT INFO
SESSIONNAME=ikecsession
SITENAME=remotevpn.cfg
VPNUSER=Username
VPNPASS=Password
case "$1" in
start)
echo "Open ikec Connection..."
screen -S $SESSIONNAME -d -m ikec -r $SITENAME -u $VPNUSER -p $VPNPASS -a
;;
stop)
echo "Closing ikec Connection..."
su $RUNAS -c "screen -S $SESSIONNAME -X quit"
;;
*)
echo "Fehlerhafter Aufruf"
echo "Syntax: $0 {start|stop}"
exit 1
;;
esac
- Change rights and install the script
sudo chmod 700 /etc/init.d/ikec && sudo update-rc.d ikec defaults && sudo /etc/init.d/ikec start