VPN-Management-GUI 2.0.3 porting start
This commit is contained in:
232
Modules/Services/download/certinstall.sh
Executable file
232
Modules/Services/download/certinstall.sh
Executable file
@@ -0,0 +1,232 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Config-Installationsprogramm für SchulVPN"
|
||||
|
||||
if [ $USER != "root" ];
|
||||
then
|
||||
echo Root-Rechte benoetigt!
|
||||
read
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
echo "Geben Sie das Standard-Wireless Interface ein: "
|
||||
read WLAN
|
||||
echo "Geben Sie die ESSID an, bei dem OpenVPN nicht verbinden soll: "
|
||||
read NOVPNESSID
|
||||
echo "Geben Sie das Interface an, bei dem OpvenVPN nicht verbinden soll: "
|
||||
read NOVPNINT
|
||||
echo "Geben Sie Ihren Benutzernamen ein: "
|
||||
read BENUTZER
|
||||
|
||||
mkdir $HOME/.vpn
|
||||
mkdir $HOME/.vpn/keys
|
||||
|
||||
##------------------------------------------------------------------------------
|
||||
#/etc/NetworkManager/dispatcher.d/02vpn
|
||||
##------------------------------------------------------------------------------
|
||||
echo "#!/bin/bash
|
||||
|
||||
INTERFACE=\$1
|
||||
ACTION=\$2
|
||||
|
||||
ESSID=\$(iwconfig "$WLAN" | grep ESSID | cut -d':' -f2 | sed -e 's/Nickname//g' | sed -e 's/\"//g'| sed -e 's/ //g')
|
||||
|
||||
echo '\$ESSID + \$INTERFACE + \$ACTION' >> /var/log/vpnscript.log
|
||||
|
||||
case \$ACTION in
|
||||
up)
|
||||
if [ \$ESSID != "$NOVPNESSID" ]; then
|
||||
if [ \$INTERFACE != "$NOVPNINT" ]; then
|
||||
echo 'starte script' >> /var/log/vpnscript.log
|
||||
|
||||
"$HOME"/.vpn/scriptconn.sh
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
down)
|
||||
if [ '\$(pidof openvpn)' ]; then
|
||||
echo 'killall openvpn' >> /var/log/vpnscript.log
|
||||
killall openvpn
|
||||
fi
|
||||
;;
|
||||
|
||||
pre-up)
|
||||
;;
|
||||
|
||||
post-down)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 'Usage: \$0 {up|down|pre-up|post-down}'
|
||||
echo 'finish' >> /var/log/vpnscript.log
|
||||
exit 1
|
||||
esac
|
||||
" > /etc/NetworkManager/dispatcher.d/02vpn
|
||||
chown root:root /etc/NetworkManager/dispatcher.d/02vpn
|
||||
chmod +x /etc/NetworkManager/dispatcher.d/02vpn
|
||||
|
||||
##------------------------------------------------------------------------------
|
||||
#~/.vpn/scriptconn.sh
|
||||
##------------------------------------------------------------------------------
|
||||
|
||||
echo "#!/bin/bash
|
||||
|
||||
echo 'Starte Openvpn' >> /var/log/vpnscript.log
|
||||
openvpn --config "$HOME"/.vpn/schulvpn.ovpn &
|
||||
|
||||
#sudo -u "$BENUTZER" kdialog --title 'OpenVPN' --passivepopup 'Verbindung wird hergestellt!' 4 --display :0
|
||||
#echo 'Dialog angezeit - fin' >> /var/log/vpnscript.log
|
||||
|
||||
exit 0
|
||||
" > $HOME/.vpn/scriptconn.sh
|
||||
##------------------------------------------------------------------------------
|
||||
#~/.vpn/scriptstate.sh
|
||||
##------------------------------------------------------------------------------
|
||||
|
||||
echo "#!/bin/bash
|
||||
|
||||
if [ \$1 = 'connected' ]
|
||||
then sudo -u "$BENUTZER" kdialog --title 'OpenVPN' --passivepopup 'Verbunden!' 4 --display :0
|
||||
elif [ \$1 = 'disconnected' ]
|
||||
then sudo -u "$BENUTZER" kdialog --title 'OpenVPN' --passivepopup 'Verbindung getrennt!' 4 --display :0
|
||||
else
|
||||
echo 'fail'
|
||||
echo 'scriptconn started' >> /var/log/vpnlog.log
|
||||
fi
|
||||
|
||||
exit 0
|
||||
" > $HOME/.vpn/scriptstate.sh
|
||||
|
||||
##------------------------------------------------------------------------------
|
||||
#CertCopy
|
||||
##------------------------------------------------------------------------------
|
||||
|
||||
cert=$(ls *.key |cut -d "." -f1 |cut -d "/" -f3)
|
||||
#cert=$(echo $cert | cut -d " " -f1)
|
||||
|
||||
controll="0"
|
||||
|
||||
if [ -z "$cert" ];
|
||||
then
|
||||
echo "Es wurde kein Zertifikat gefunden"
|
||||
controll="1"
|
||||
else
|
||||
echo "Es wurde ein Zertifikat gefunden: "$cert".key"
|
||||
|
||||
cp $cert.key $HOME/.vpn/keys/$cert.key
|
||||
cp $cert.crt $HOME/.vpn/keys/$cert.crt
|
||||
cp ca.crt $HOME/.vpn/keys/ca.crt
|
||||
fi
|
||||
|
||||
if [ $controll == "0" ]
|
||||
then
|
||||
|
||||
test -e "$HOME/.vpn/keys/$cert.crt"
|
||||
if [ 1 == $? ];
|
||||
then
|
||||
echo $cert.crt nicht richtig kopiert
|
||||
controll="1"
|
||||
fi
|
||||
|
||||
|
||||
test -e "$HOME/.vpn/keys/$cert.key"
|
||||
if [ 1 == $? ];
|
||||
then
|
||||
echo $cert.key nicht richtig kopiert
|
||||
controll="1"
|
||||
fi
|
||||
|
||||
|
||||
test -e "$HOME/.vpn/keys/ca.crt"
|
||||
if [ 1 == $? ];
|
||||
then
|
||||
echo ca.crt nicht richtig kopiert
|
||||
controll="1"
|
||||
fi
|
||||
|
||||
|
||||
if [ 0 == $controll ];
|
||||
then
|
||||
echo "#Konfiguriert by Christoph Haas
|
||||
#Copyleft CyberLabs 2008-09
|
||||
#Veraendern auf EIGENE GEFAHR...
|
||||
|
||||
#Start
|
||||
|
||||
##########################################################
|
||||
# AENDERUNGEN START
|
||||
##########################################################
|
||||
#Zertifikate
|
||||
ca "$HOME"/.vpn/keys/ca.crt
|
||||
cert "$HOME"/.vpn/keys/"$cert".crt
|
||||
key "$HOME"/.vpn/keys/"$cert".key
|
||||
|
||||
##########################################################
|
||||
# AENDERUNGEN ENDE
|
||||
#########################################################
|
||||
#Modus
|
||||
client
|
||||
|
||||
#IP Modus
|
||||
float
|
||||
|
||||
#Tunnel Modus/Device
|
||||
dev tap
|
||||
|
||||
#MTU laenge
|
||||
tun-mtu 1500
|
||||
|
||||
#probleme mit windoof clients verhindern
|
||||
;fragment 1500 #udp only
|
||||
mssfix
|
||||
|
||||
#LAN Adapter Name (optional^^)
|
||||
;dev-node my-tap
|
||||
|
||||
#Protokoll fuern Tunnel (in da schule tcp)
|
||||
proto tcp-client
|
||||
|
||||
#Pushs vom Server abarbeiten
|
||||
pull
|
||||
|
||||
#Server IP / PORT
|
||||
remote 10.10.63.60 1194
|
||||
|
||||
#Server COMMON Name
|
||||
#tls-remote VPNServer
|
||||
|
||||
#Authentifizierung/Encryption
|
||||
;auth SHA1
|
||||
cipher aes-256-cbc
|
||||
|
||||
#Adress bind verhindern
|
||||
nobind
|
||||
|
||||
#Komprimierung
|
||||
comp-lzo
|
||||
|
||||
#LINUX/UNIX only
|
||||
;persist-key
|
||||
;persist-tun
|
||||
|
||||
script-security 2
|
||||
|
||||
# eventuelle kde4 integration
|
||||
;route-up '"$HOME"/.vpn/scriptstate.sh connected'
|
||||
;down '"$HOME"/.vpn/scriptstate.sh disconnected'
|
||||
|
||||
#Ende
|
||||
" > $HOME/.vpn/schulvpn.ovpn
|
||||
chmod +x $HOME/.vpn/*
|
||||
echo SchulVPN ist jetzt verwendbar!
|
||||
read
|
||||
exit 0
|
||||
else
|
||||
echo "Überprüfen Sie, ob das zip paket richtig entpackt wurde!"
|
||||
echo "Führen Sie anschließend das Setup nocheinmal aus!"
|
||||
read
|
||||
exit 1
|
||||
fi
|
||||
fi
|
232
Modules/Services/download/certinstall.sh.bak
Executable file
232
Modules/Services/download/certinstall.sh.bak
Executable file
@@ -0,0 +1,232 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Config-Installationsprogramm für SchulVPN"
|
||||
|
||||
if [ $USER != "root" ];
|
||||
then
|
||||
echo Root-Rechte benoetigt!
|
||||
read
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
echo "Geben Sie das Standard-Wireless Interface ein: "
|
||||
read WLAN
|
||||
echo "Geben Sie die ESSID an, bei dem OpenVPN nicht verbinden soll: "
|
||||
read NOVPNESSID
|
||||
echo "Geben Sie das Interface an, bei dem OpvenVPN nicht verbinden soll: "
|
||||
read NOVPNINT
|
||||
|
||||
mkdir $HOME/.vpn
|
||||
mkdir $HOME/.vpn/keys
|
||||
|
||||
##------------------------------------------------------------------------------
|
||||
#/etc/NetworkManager/dispatcher.d/02vpn
|
||||
##------------------------------------------------------------------------------
|
||||
echo "#!/bin/bash
|
||||
|
||||
INTERFACE=\$1
|
||||
ACTION=\$2
|
||||
|
||||
ESSID=\$(iwconfig "$WLAN" | grep ESSID | cut -d':' -f2 | sed -e 's/Nickname//g' | sed -e 's/\"//g'| sed -e 's/ //g')
|
||||
|
||||
echo '\$ESSID + \$INTERFACE + \$ACTION' >> /var/log/vpnscript.log
|
||||
|
||||
case \$ACTION in
|
||||
up)
|
||||
if [ \$ESSID != \""$NOVPNESSID"\" ]; then
|
||||
if [ \$INTERFACE != \""$NOVPNINT"\" ]; then
|
||||
echo 'starte script' >> /var/log/vpnscript.log
|
||||
|
||||
"$HOME"/.vpn/scriptconn.sh
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
down)
|
||||
if [ '\$(pidof openvpn)' ]; then
|
||||
echo 'killall openvpn' >> /var/log/vpnscript.log
|
||||
killall openvpn
|
||||
fi
|
||||
;;
|
||||
|
||||
pre-up)
|
||||
;;
|
||||
|
||||
post-down)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo $'Usage: \$0 {up|down|pre-up|post-down}'
|
||||
echo 'finish' >> /var/log/vpnscript.log
|
||||
exit 1
|
||||
esac
|
||||
" > /etc/NetworkManager/dispatcher.d/02vpn
|
||||
chown root:root /etc/NetworkManager/dispatcher.d/02vpn
|
||||
chmod +x /etc/NetworkManager/dispatcher.d/02vpn
|
||||
|
||||
##------------------------------------------------------------------------------
|
||||
#~/.vpn/scriptconn.sh
|
||||
##------------------------------------------------------------------------------
|
||||
|
||||
echo "#!/bin/bash
|
||||
|
||||
echo 'Starte Openvpn' >> /var/log/vpnscript.log
|
||||
openvpn --config "$HOME"/.vpn/schulvpn.ovpn &
|
||||
|
||||
#sudo -u "$USER" kdialog --title 'OpenVPN' --passivepopup 'OpenVPN - Verbindung wird hergestellt!' 4 --display :0
|
||||
|
||||
#echo 'Dialog angezeit - fin' >> /var/log/vpnscript.log
|
||||
exit 0
|
||||
" > $HOME/.vpn/scriptconn.sh
|
||||
##------------------------------------------------------------------------------
|
||||
#~/.vpn/scriptstate.sh
|
||||
##------------------------------------------------------------------------------
|
||||
|
||||
echo "#!/bin/bash
|
||||
|
||||
BENUTZER=$(cat /etc/passwd |grep 1000 |cut -d ':' -f1)
|
||||
|
||||
if [ $1 = 'connected' ]
|
||||
then sudo -u "$BENUTZER" kdialog --title 'OpenVPN' --passivepopup 'OpenVPN - Verbunden!' 4 --display :0
|
||||
elif [ $1 = 'disconnected' ]
|
||||
then sudo -u "$BENUTZER" kdialog --title 'OpenVPN' --passivepopup 'OpenVPN - Verbindung getrennt!' 4 --display :0
|
||||
else
|
||||
echo 'fail'
|
||||
echo 'scriptconn started' >> /var/log/vpnlog.log
|
||||
fi
|
||||
|
||||
exit 0
|
||||
" > $HOME/.vpn/scriptstate.sh
|
||||
|
||||
##------------------------------------------------------------------------------
|
||||
#CertCopy
|
||||
##------------------------------------------------------------------------------
|
||||
|
||||
cert=$(ls *.key |cut -d "." -f1 |cut -d "/" -f3)
|
||||
#cert=$(echo $cert | cut -d " " -f1)
|
||||
|
||||
controll="0"
|
||||
|
||||
if [ -z "$cert" ];
|
||||
then
|
||||
echo "Es wurde kein Zertifikat gefunden"
|
||||
controll="1"
|
||||
else
|
||||
echo "Es wurde ein Zertifikat gefunden: "$cert".key"
|
||||
|
||||
cp $cert.key $HOME/.vpn/keys/$cert.key
|
||||
cp $cert.crt $HOME/.vpn/keys/$cert.crt
|
||||
cp ca.crt $HOME/.vpn/keys/ca.crt
|
||||
fi
|
||||
|
||||
if [ $controll == "0" ]
|
||||
then
|
||||
|
||||
test -e "$HOME/.vpn/keys/$cert.crt"
|
||||
if [ 1 == $? ];
|
||||
then
|
||||
echo $cert.crt nicht richtig kopiert
|
||||
controll="1"
|
||||
fi
|
||||
|
||||
|
||||
test -e "$HOME/.vpn/keys/$cert.key"
|
||||
if [ 1 == $? ];
|
||||
then
|
||||
echo $cert.key nicht richtig kopiert
|
||||
controll="1"
|
||||
fi
|
||||
|
||||
|
||||
test -e "$HOME/.vpn/keys/ca.crt"
|
||||
if [ 1 == $? ];
|
||||
then
|
||||
echo ca.crt nicht richtig kopiert
|
||||
controll="1"
|
||||
fi
|
||||
|
||||
|
||||
if [ 0 == $controll ];
|
||||
then
|
||||
echo "#Konfiguriert by Christoph Haas
|
||||
#Copyleft CyberLabs 2008-09
|
||||
#Veraendern auf EIGENE GEFAHR...
|
||||
|
||||
#Start
|
||||
|
||||
##########################################################
|
||||
# AENDERUNGEN START
|
||||
##########################################################
|
||||
#Zertifikate
|
||||
ca "$HOME"/.vpn/keys/ca.crt
|
||||
cert "$HOME"/.vpn/keys/"$cert".crt
|
||||
key "$HOME"/.vpn/keys/"$cert".key
|
||||
|
||||
##########################################################
|
||||
# AENDERUNGEN ENDE
|
||||
#########################################################
|
||||
#Modus
|
||||
client
|
||||
|
||||
#IP Modus
|
||||
float
|
||||
|
||||
#Tunnel Modus/Device
|
||||
dev tap
|
||||
|
||||
#MTU laenge
|
||||
tun-mtu 1500
|
||||
|
||||
#probleme mit windoof clients verhindern
|
||||
;fragment 1500 #udp only
|
||||
mssfix
|
||||
|
||||
#LAN Adapter Name (optional^^)
|
||||
;dev-node my-tap
|
||||
|
||||
#Protokoll fuern Tunnel (in da schule tcp)
|
||||
proto tcp-client
|
||||
|
||||
#Pushs vom Server abarbeiten
|
||||
pull
|
||||
|
||||
#Server IP / PORT
|
||||
remote 10.10.63.60 1194
|
||||
|
||||
#Server COMMON Name
|
||||
#tls-remote VPNServer
|
||||
|
||||
#Authentifizierung/Encryption
|
||||
;auth SHA1
|
||||
cipher aes-256-cbc
|
||||
|
||||
#Adress bind verhindern
|
||||
nobind
|
||||
|
||||
#Komprimierung
|
||||
comp-lzo
|
||||
|
||||
#LINUX/UNIX only
|
||||
;persist-key
|
||||
;persist-tun
|
||||
|
||||
script-security 2
|
||||
|
||||
# eventuelle kde4 integration
|
||||
;route-up '"$HOME"/.vpn/scriptstate.sh connected'
|
||||
;down '"$HOME"/.vpn/scriptstate.sh disconnected'
|
||||
|
||||
#Ende
|
||||
" > $HOME/.vpn/schulvpn.ovpn
|
||||
chmod +x $HOME/.vpn/*
|
||||
echo SchulVPN ist jetzt verwendbar!
|
||||
read
|
||||
exit 0
|
||||
else
|
||||
echo "Überprüfen Sie, ob das zip paket richtig entpackt wurde!"
|
||||
echo "Führen Sie anschließend das Setup nocheinmal aus!"
|
||||
read
|
||||
exit 1
|
||||
fi
|
||||
fi
|
BIN
Modules/Services/download/logger.zip
Executable file
BIN
Modules/Services/download/logger.zip
Executable file
Binary file not shown.
BIN
Modules/Services/download/openvpn-2.2-beta3-install.exe
Normal file
BIN
Modules/Services/download/openvpn-2.2-beta3-install.exe
Normal file
Binary file not shown.
19
Modules/Services/download/readme.txt
Executable file
19
Modules/Services/download/readme.txt
Executable file
@@ -0,0 +1,19 @@
|
||||
LINUX:
|
||||
openvpn installieren (am besten über apt-get oder synaptic)
|
||||
|
||||
und einfach:
|
||||
chmod +x certinstall.sh // Script ausfuehrbar machen
|
||||
sudo ./certinstall.sh // Installation starten
|
||||
ausfuehren.
|
||||
|
||||
WINDOWS:
|
||||
OpenVPN-Client herunterladen
|
||||
EXE-Ausführen
|
||||
Alle Keyfiles ("number".key, "number".crt, ca.crt) ins (evt zuvor angelegte) "keys" Directory im "SchulVPN\config\" Ordner kopieren. (Keys liegen dann zb. unter "C:/Programme/SchulVPN/config/keys/")
|
||||
Anschließend die schulvpn.ovpn nach "SchulVPN/config" kopieren und darin die Pfade und Nummern anpassen.
|
||||
|
||||
Bsp ordnerstruktur:
|
||||
"C:/Programme/SchulVPN/config/schulvpn.ovpn"
|
||||
"C:/Programme/SchulVPN/config/keys/01.crt"
|
||||
"C:/Programme/SchulVPN/config/keys/01.key"
|
||||
"C:/Programme/SchulVPN/config/keys/ca.crt"
|
BIN
Modules/Services/download/schul-vpn-gui-1_1_0_src.tar.gz
Executable file
BIN
Modules/Services/download/schul-vpn-gui-1_1_0_src.tar.gz
Executable file
Binary file not shown.
BIN
Modules/Services/download/schulvpn-2.1-gui-1.1.1-install.exe
Executable file
BIN
Modules/Services/download/schulvpn-2.1-gui-1.1.1-install.exe
Executable file
Binary file not shown.
69
Modules/Services/download/schulvpn.ovpn
Executable file
69
Modules/Services/download/schulvpn.ovpn
Executable file
@@ -0,0 +1,69 @@
|
||||
#Konfiguriert by Christoph Haas
|
||||
#Copyleft CyberLabs 2008-10
|
||||
#Veraendern auf EIGENE GEFAHR...
|
||||
|
||||
#Start
|
||||
|
||||
##########################################################
|
||||
# AENDERUNGEN START
|
||||
##########################################################
|
||||
#Zertifikate (evt pfad anpassen)
|
||||
ca /pfad/zur/config/ca.crt # pfad anpassen!
|
||||
cert /pfad/zur/config/muster.crt # pfad anpassen! & muster zu nummer aendern!
|
||||
key /pfad/zur/config/muster.key # pfad anpassen! & muster zu nummer aendern!
|
||||
|
||||
##########################################################
|
||||
# AENDERUNGEN ENDE
|
||||
#########################################################
|
||||
#Modus
|
||||
client
|
||||
|
||||
#IP Modus
|
||||
float
|
||||
|
||||
#Tunnel Modus/Device
|
||||
dev tap
|
||||
|
||||
#MTU laenge
|
||||
tun-mtu 1500
|
||||
|
||||
#probleme mit windoof clients verhindern
|
||||
;fragment 1500 #udp only
|
||||
mssfix
|
||||
|
||||
#LAN Adapter Name (optional^^)
|
||||
;dev-node my-tap
|
||||
|
||||
#Protokoll fuern Tunnel (in da schule tcp)
|
||||
proto tcp-client
|
||||
|
||||
#Pushs vom Server abarbeiten
|
||||
pull
|
||||
|
||||
#Server IP / PORT
|
||||
remote 10.10.63.60 1194
|
||||
|
||||
#Server COMMON Name
|
||||
#tls-remote VPNServer
|
||||
|
||||
#Authentifizierung/Encryption
|
||||
;auth SHA1
|
||||
cipher aes-256-cbc
|
||||
|
||||
#Adress bind verhindern
|
||||
nobind
|
||||
|
||||
#Komprimierung
|
||||
comp-lzo
|
||||
|
||||
#LINUX/UNIX only
|
||||
;persist-key
|
||||
;persist-tun
|
||||
|
||||
script-security 2
|
||||
|
||||
# kde4 notification
|
||||
# route-up "/home/christoph/.vpn/scriptstate.sh connected"
|
||||
# down "/home/christoph/.vpn/scriptstate.sh disconnected"
|
||||
|
||||
#Ende
|
BIN
Modules/Services/download/schulvpn_1-1-0_install_src.tar.gz
Executable file
BIN
Modules/Services/download/schulvpn_1-1-0_install_src.tar.gz
Executable file
Binary file not shown.
BIN
Modules/Services/download/vpn_maverick32.zip
Normal file
BIN
Modules/Services/download/vpn_maverick32.zip
Normal file
Binary file not shown.
BIN
Modules/Services/download/vpn_maverick64.zip
Normal file
BIN
Modules/Services/download/vpn_maverick64.zip
Normal file
Binary file not shown.
Reference in New Issue
Block a user