OpenVPN TLS Handshake failed auf Port 443
Gerade habe ich den folgenden Fehler bekommen:
TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity) TLS Error: TLS handshake failed
Passiert ist das, weil ich die Portsperre umgehen wollte und von Port 1194 auf Port 443(also "HTTPS") umgestellt habe. Dabei habe ich aber vergessen, dass durch die Firewall nur TCP-Verkehr durchgelassen wird(HTTPS geht über TCP). Da OpenVPN aber standardmässig UDP benutzt, bekommt man trotz offenem Port diese Fehlermeldung.
Einfach in der client.conf und der server.conf die Zeile proto tcp einkommentieren und proto udp auskommentieren. Wenn man zusätzlich noch UDP möchte, muss man 2 OpenVPN Instanzen laufen lassen. Das geht natürlich auf die Performance, hilft aber gegen blöde Firewalls.
How to get facebook back online #facebookdown
Seems like facebook has some kind of DNS-Problem right now(#facebookdown). To fix this enter the facebook IPs in your hosts-file. To get them, have a look at your DNS Cache with a tool like dig(or use the ones I provide below).
Linux
repat@laptop:~$ dig facebook.com ; <<>> DiG 9.8.1-P1 <<>> facebook.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 11887 ;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;facebook.com. IN A ;; ANSWER SECTION: facebook.com. 6010 IN A 69.171.229.16 facebook.com. 6010 IN A 173.252.100.16 facebook.com. 6010 IN A 173.252.101.16 facebook.com. 6010 IN A 66.220.152.16 facebook.com. 6010 IN A 66.220.158.16 facebook.com. 6010 IN A 69.171.224.32
So just enter this into your /etc/hosts file:
#vi /etc/hosts
66.220.158.16 facebook.com 66.220.158.16 www.facebook.com
Windows
Windows has a similar file, which is located in %SystemRoot%\system32\drivers\etc\hosts. Where %SystemRoot% is your Windows directory, so most likely C:\Windows.
At least in Windows 7 the file is locked by the system, so unless you have notepad++, which doesn't care about all this, you have to open your explorer, go to C:\Windows\system32\, right-click notepad.exe and select "start with admin rights"(or something like that...). Then click File/open, go to C:\Windows\system32\drivers\etc and select "all files" on the right side(see screenshot). Then again open the file and enter the following:
66.220.158.16 facebook.com 66.220.158.16 www.facebook.com
MacOS
1. Click on the looking glass icon in the top right corner of the screen
2. Type "Terminal" and press Enter, a new app called "Terminal" will appear
3. Don't get confused by it, just follow the steps
4. Copy this text into your clipboard : echo "173.252.101.16 www.facebook.com" | sudo tee -a /etc/hosts
5. Paste it into the "Terminal" window and press Enter
6. You will be prompted to enter your password (it will not show up on the screen, don't worry about it), press Enter again when you finished typing your password.
7. The line "173.252.101.16 www.facebook.com" will appear on the screen.
8. Done!
Programme über SSH auf Display :0 starten
Um Programme über SSH auf einem Bildschirm zu starten, der über Kabel angeschlossen ist muss man bei bestimmten Konfigurationen erstmal herausbekommen, welches Display zu welchem physikalischen Bildschirm gehört. Wenn es nur einen gibt ist es meistens 0.
Der aktuelle Bildschirm ist gelockt, d.h. wenn man versuchen würde über SSH jetzt ein Programm zu starten kommt folgende Meldung:
pi@raspberrypi ~ $ leafpad leafpad: Anzeige kann nicht geöffnet werden:
Oder über xinit:
pi@raspberrypi ~ $ xinit leafpad :0 Fatal server error: Server is already active for display 0 If this server is no longer running, remove /tmp/.X0-lock and start again. Please consult the The X.Org Foundation support at http://wiki.x.org for help.
Um das zu lösen muss kann man folgende Befehle benutzen:
pi@raspberrypi ~ $export DISPLAY=:0 pi@raspberrypi ~ $ firefox
Das ist vor allem praktisch, falls VNC nicht auf den ersten Display vom X-Server zugreifen kann(-> x0vnc). Um einfach nur eine grafische Oberfläche zu bekommen reicht ja normalerweise das XForwarding vom SSH-Server oder normales VNC
Credits go to Oli.
Install ssl-cert-check plugin under SLES11 with Nagios 3.0.6
The guys at prefetch.net already wrote a script for checking if a SSL certificate is still valid: http://prefetch.net/code/ssl-cert-check
The only challenge now is to implement the script into the monitoring tool Nagios, in this case we used a SuSE Linux Enterprise Server 11 and Nagios version 3.0.6.

To get the little boxes in Nagios green, yellow and red(=Nagios' return values) and to receive e-mails in case of an expiration you have to change these 2 parameters in the ssl-cert-check file:
NAGIOS=TRUE ALARM=TRUE
To match the given form of Nagios plugins we renamed the file to check_ssl-cert and then moved it to /usr/lib/nagios/plugins, where the rest of the plugins are.
For Nagios to recognize the plugin it has to be defined in /etc/nagios/objects/commands.cfg (NOT /etc/nagios/commands.cfg):
define command {
command_name check_ssl-cert
command_line /usr/lib/nagios/plugins/check_ssl-cert -s $HOSTADDRESS$ -p 443 -e $ARG1$
}
The port is usually the same for the same service. If it's not port 443 for every server, you can also define the port as the second parameter in the next step. Of course, instead of -p 443 it has to be -p $ARG2$.
You now have to add the configuration of the plugin in /etc/nagios/conf.d/services.cfg. In this case, the hostgroup "all" is selected, but if you have different hostgroups, the admin who has to get the e-mail might be different. The parameters go after the exclamation mark, comments begin with the semicolon.
define service {
hostgroup_name all
service_description ssl-certs
check_command check_ssl-cert!mail@example.org
use generic-service
notification_interval 0 ; set > 0 if you want to be renotified
}
If an ssl-cert is expired, it looks like this:

Credits go to the Alex and the other guys at the CentOS mailing list:
Pruefen ob ein Computer online ist mit ping und perl
Ich habe bei der Arbeit ein kleines Perl-Skript geschrieben, welches prüfen sollte, ob bestimmte Computer in bestimmten Räumen(also IP-Ranges) noch online sind oder schon automatisch ausgestellt wurden. Dieses Skript sendet ein Paket über ping und guckt dann, ob es ein packetloss gibt. Im Grunde wäre das in der Bash besser gewesen, aber so kann man das, wenn man es ein bisschen anpasst, auch unter anderen OS verwenden.
Code
# The string containsPacketLoss is searching for
$packetloss = "100% packet loss";
# Init
$returnval = "";
print "\nCheck if Computers are online...\n";
# Scan IP-Range
for (my $i = 1; $i <=255; $i++) {
# c = one package, w = deadline, q = quiet
$ipcmd = "ping -c1 -q -w1 169.254.1." . $i;
# execute and retreive output
$returnval = `$ipcmd`;
if (containsPacketLoss() == 0) {
# output
print "Computer with IP 169.254.1." . $i . "is still online.\n";
# write log file
system("echo Computer with IP 169.254.1.". $i . localtime(time) . " ONLINE >> /home/user/log");
}
}
sub containsPacketLoss(){
# check by RegEx if the string specified above is in the returnvalue
# of the ping command
if ($returnval =~ m/$packetloss/ ){
return 1;
}
return 0;
}
Download
Wo stehen die Server von …
Mit dem Firefox Plugin Flagfox(Mozilla Add-On Page) lassen sich von den meisten Websites die Serverstandorte anhand der Nationalflagge sowie die Domainzugehörigkeit herausfinden. Ein Mouse-Over zeigt die Länder nochmal ausgeschrieben an, da man ja nicht unbedingt von allen >190 Ländern die Flagge kennt.
XMPP/Jabber, VoIP(jingle), Webcam und Remote Desktop auf Dockstar
Wenn man sich die anderen Beiträge hier anguckt, merkt man, dass ich mich in letzter Zeit ziemlich viel mit XMPP/Jabber, Verschlüsselung und VoIP beschäftige. Leider gab es lange Zeit keine gute Alternative zu Skype aber nach ein paar Stunden testen, meine ich tatsächlich eine Lösung gefunden zu haben: jitsi. Wer das schon länger verfolgt, kennt das Programm vielleicht noch unter dem Namen SIP-Communicator. Inzwischen ist es ein vollwertiger Instant Messenger, der auch ICQ, Windows Live(MSN) und weitere Messenger unterstützt. Mit der Implementierung von jingle gehen jetzt auch Voice Calls und Webcam, grade unter Windows 7 zu Windows XP und Ubuntu 10.04 getestet.
Nun ist man natürlich immer noch abhängig vom Anbieter des XMPP-Servers, allerdings nicht mehr von Red5, welches in Java geschrieben ist und somit wohl eher nicht auf z.B. der Dockstar (->Openfire) läuft :-/ ... mit der ebenfalls Webcam und Audio möglich war, s. jabber-server.de/red5 über Spark(Client) und Openfire (Server). Hier also mal eine kleine Auflistung von öffentlichen Jabber-Servern:
- http://jabber.org
- http://web.jabber.ccc.de/ (Chaos Computer Club Deutschland)
- http://jabber-server.de (privat, non-profit)
- JUNe-Projekt (Jabber Server von einigen Unis in Deutschland und Österreich)
- Liste öffentlicher Jabber Server im Ubuntu-Wiki
Für optimale Privacy kann man natürlich auch einen eigenen Jabber-Server, z.B. ejabberd aufsetzen. Das funktioniert auch mit einer 1GHz ARMEL CPU auf der Dockstar (!)
Ein sehr geiles Feature, nach dem ich überhaupt nicht überhaupt gesucht hatte, ist die Remote-Desktop Funkionlität. Sonst habe ich das immer über das proprietäre logmein.com/hamachi gemacht, aber das gefällt mir natürlich besser:) OTR für's chatten ist eingebaut und funktioniert auch out-of-the-box mit Pidgin auf der Gegenseite( und damit wohl auch Adium)
update: Die Gespräche sind über ZRTP verschlüsselt
Pidgin und OTR in einer Datei
Bei einer Diskussion beim Easterhegg 2011 kamen wir auf die Idee, dass die Leute vielleicht einfacher dazu bewegen wären, Pidgin mit OTR-Verschlüsselung zu installieren, wenn es einfach nur eine Installationsdatei geben würde und man nicht, wie auch z.B. in meinem Blog(engl.), man eine Anleitung dazu schreiben muss. Diese hier ist einfach:
1. Download
2. Draufklicken
- Pidgin Version: 2.7.11
- pidgin-otr Version: 3.2.0-1
(Sowohl Pidgin als auch pidgin-otr sind freie Software unter der GPL.)
//edit: Alternativ lohnt sich auch Jitsi, das auch noch Skype(Audio/Webcam) und Remote-Desktop Programme ersetzen kann.
Making Skype secure via VPN or SSH Tunnel
Since you just can not convince people not to use Skype because it really is insecure, I decided to make Skype more secure by adding extra encryption, which is, as I found out, pretty simple. Just for written conversations you might want to try cryptochat, an extension just for skype(128-bit RSA), but no guarantees, I just googled it myself. Also consider using another service besides Skype(de) for as many connections as possible.
VPN (Virtual Private Network) (easiest)
A VPN creates a tunnel to a service provider you trust, preferably in a country where providers are not allowed to store traffic data(unlike the US I think). This means every bit of traffic is as good secured as the encryption to the end of the tunnel is. Between you and your computer, there is nothing(not your ISP or eavesdropper) that could intercept the data. On the other hand, you have to trust the VPN Provider.
For a few bucks a month(~5€) you can rent a VPN Service from several providers, see list below. Be sure not to use PPTP, because this (theoretically) is fairly insecure as well, a good choice might be OpenVPN or IPSec/L2TP. Most of the providers also have an idiot-proof introduction and how-to on their homepage.
SSH(Secure Shell)(advanced)
With both putty under Windows and OpenSSH under Linux it is possible to create a tunnel and use it on your computer like a socks5 proxy server. For creating a really secure SSH connection, don't use passwords but public-keys. Without any programming you can set up the encryption up to 4096bit which is quite strong. Some of the latest OpenSSH Versions even support ECC (e.g. for mobile..(?)). Use this tutorial to create a tunnel with windows, for Linux use this command:
ssh -D 42 user@host
Where 42 is the port, user is the linux username and host is the hostname of your provider. Then configure your Skype with the following settings(not for VPN!):

Important
All the tweaks shown here don't make skype secure(!), just a little more secure as it was before, adding extra encryption (see RC4). It doesn't prevent Skype or Intelligence Services from intercepting what you're skyping. If your computer is insecure e.g. because of keyloggers, trojan horses etc, VPN/SSH is just useless.
Providers
- https://www.shellfire.de/
- https://www.vpntunnel.se/de (only e-mail adress, nickname and a payment method(see below))
- http://strongvpn.com/
- https://www.relakks.com/
- http://unblockvpn.com
- http://www.google.com/search?hl=en&q=rent%20vpn
Payment
- Anonymous payment at telecomix
- Pay via bitcoins, an "anonymous" internet crypto-currency
- Credit Cards
- Paypal
//edit: make sure you check out jitsi !
Internet Verbindung ueber WLAN teilen mit Xubuntu 10.04
Ganz einfach eigentlich, man muss nur im XFCE4 Network Manager Neues Funknetzwerk erstellen... anklicken, einen Netzwerknamen(SSID, <=32 bytes) eingeben und eine Verschlüsselung eingeben, möglichst nicht WEP, weil das bekanntlich leicht knackbar ist, dann ein Passwort. Er verbindet sich dann selbst zu dem Netzwerk und teilt somit die Internet Verbindung die per Kabel oder 2ter W-LAN Karte kommt. Mit der selben W-LAN Karte die Verbindung teilen geht nicht.
Hier nochmal in Bildern(click to enlarge):

SSID, Verschlüsselung und Passwort eingeben
Einstellen nachschauen:

Rechtsklick auf Network Manager, Verbindung bearbeiten...

Entsprechendes Netzwerk auswählen und bearbeiten klicken

Verbindungstyp sollte AdHoc sein








