VPN-Management-GUI 2.0.3 porting start

This commit is contained in:
2012-07-16 19:30:19 +00:00
commit d3b0130655
545 changed files with 19128 additions and 0 deletions

View 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

View 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

Binary file not shown.

View 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"

Binary file not shown.

Binary file not shown.

View 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

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

78
Modules/Services/index.php Executable file
View File

@@ -0,0 +1,78 @@
<!-- MAIN CONTENT BEGINN ################################################################################ -->
<div class="art-content">
<div class="art-Post">
<div class="art-Post-body">
<div class="art-Post-inner">
<h2 class="art-PostHeaderIcon-wrapper">
<span class="art-PostHeader">Service & Information</span>
</h2>
<a href="#ovp"> -- OpenVPN -- </a> | <a href="#proxy"> -- Proxy -- </a> | <a href="#down"> -- Download -- </a>
<hr/>
<div class="art-PostContent">
<h4><a name="ovpn">OpenVPN Service</a></h4>
<table>
<tr>
<td>
<img src="/Modules/Services/img/Abbildung2.png" width=500 align=left hspace=10 vspace=5 border=0 alt="OpenVPN" />
</td>
<td>
<p>
Durch den VPN-Tunnel wird es einem Sniffer nicht mehr gelingen die Daten die über das WLAN versendet werden mit zu lesen.
</p>
<p>Einen Client fuer SchulVPN gibt es hier:<br /></p>
<p><a href="/Modules/Services/download/schulvpn-2.1-gui-1.1.1-install.exe"># Windows XP und älter</a></p>
<p><a href="/Modules/Services/download/openvpn-2.2-beta3-install.exe"># Windows Vista, 7, x64</a></p>
<p><a href="/Modules/Services/download/vpn_maverick32.zip"># Ubuntu 10.10 x32</a></p>
<p><a href="/Modules/Services/download/vpn_maverick64.zip"># Ubuntu 10.10 x64</a></p>
<h6>Source Code:</h6>
<p><a href="/Modules/Services/download/schul-vpn-gui-1_1_0_src.tar.gz">SchulVPN Gui Source</a></p>
<p><a href="/Modules/Services/download/schulvpn_1-1-0_install_src.tar.gz">SchulVPN Gui Installer Source</a></p>
<p><a href="/Modules/Services/download/logger.zip">Server Logger Source</a></p>
<br />
<hr />
<p>Server Daten:</p>
<p>HP ProLiant DL320 Blade Server mit gemoddeter Kühlung</p>
<p>Prozessor: Intel Pentium 4 @ 2,26 GHz</p>
<p>RAM: 2GHz Dualchannel DDR400</p>
<p>HDD: 40GB 7200 ATA Platten | RAID 1</p>
<p>Netzwerk anbindung: 1000MBit/s switched</p>
<p>Operating System: Ubuntu Server 10.04 LTS</p>
<p>Software: OpenVPN 2.1, Apache2, MySQL, PHP</p>
</td>
</tr>
</table>
</div>
<br /><br /><br /><br /><hr /><br /><br />
<div class="art-PostContent">
<h4><a name="down">Download Service</a></h4>
<p>
Wir haben neben dem eigentlichen VPN Projekt auch einen kleinen /Modules/Services/downloaderver installiert. Über diesen kann man aktuelle Linux-Distributionen oder Software für den Unterrichtsgebrauch beziehen.
Als Unterbau dient uns hier eine Leicht modifizierte Version von QuiXplorer.
<a href="http://quixplorer.sourceforge.net">QuiXplorer Website</a>
</p>
<p> <b>***NEU***</b>: Ab sofort ist in der Download-Sektion auch jede Menge Quellcode zum Download vorhanden! <br />
Also zuschlagen bevor wir dies Aufgrund von Lehrern wieder vom Netz nehmen müssen xD
</p>
</div>
<br /><br />
<hr />
<br /><br /><br />
<div class="art-PostContent">
<h4><a name="proxy">Proxy Service</a></h4>
<p>Wer SchulVPN benützt hat auch die möglichkeit unseren Proxy Server zu verwenden! Dieser übernimmt die Authentifikation am Schulproxy und er hebt das Downloadlimit im Prinzip auf! (Jeder der SchulVPN benutzt stellt sein Downloadvolumen bereit, der Proxy verwendet dann alle Accounts und betreibt ein "loadbalancing". -> User was nicht so viel downloaden "spenden" ihr Downloadvolumen für andere.
</p>
<p>
<u><b>Proxy Info:</b></u><br />
<b>IP Adresse:</b> 10.8.0.1<br />
<b>Port:</b> 8080<br />
Lokale Adressen müssen aus dem Proxy ausgenommen werden! (zb: 10.10.63.0/24, moodle, luke usw.)<br />
</p>
</div>
</div>
</div>
</div>
</div>
<!-- END CONTENT BEGINN ################################################################################# -->