Another try with the wrt160nl and openwrt (Part 1) – Installing Openwrt

Author: stephan  |  Category: Linux, Netzwerk, openwrt

[lang_en]

After being unused for over an year I gave the WRT 160 NL another try .
Now there are images ready to use[1]
You can easily flash the image over an older installation ( in my case ) this way
sysupgrade -n openwrt-ar71xx-wrt160nl-squashfs.bin
or you can do it with the webgui.

To get WLAN wokring , you have to install additional packets
opkg update; opkg install kmod-ath9k hostapd wpa-supplicant
and then you have to do the following

rm /etc/config/wireless
wifi detect > /etc/config/wireless

and WLAN is working

[1]
http://downloads.openwrt.org/backfire/10.03/ar71xx/
[/lang_en]

[lang_de]
Nachdem der Router ein Jahr lang unnütz in der Ecke stand gab ich ihm eine weitere Chance.
Inzwischen gibt es auch jede Menge fertiger images [1]

Der Schnellste Weg zur Installation ist mit dem Befehl ( bei alten Instaallationen wie in meinem Fall)
sysupgrade -n openwrt-ar71xx-wrt160nl-squashfs.bin
oder über die Weboberfläche

Um Wlan zum Laufen zu Bringen müssen ein paar Packete installiert werden
opkg update; opkg install kmod-ath9k hostapd wpa-supplicant
und dann das Wlan mit den Befehlen

rm /etc/config/wireless
wifi detect > /etc/config/wireless

einrichten und WLAN funktioniert

[1]
http://downloads.openwrt.org/backfire/10.03/ar71xx/
[/lang_de]

nice spambounce

Author: stephan  |  Category: Linux, Netzwerk

[lang_de]
Eine nette Spambouncenachricht die mir auf Arbeit begegnete
Hello good Sir,

I\’m very sorry to inform you that you failed in sending me a spam-mail.
If you\’re continuing, you will fail much more and in the end you will
die.

Your Boss.
🙂
Möctte man am liebsten selber verwenden
[/lang_de]
[lang_en]
A nice spambounce I’ve seen at work.
Hello good Sir,

I\’m very sorry to inform you that you failed in sending me a spam-mail.
If you\’re continuing, you will fail much more and in the end you will
die.

Your Boss.
🙂
Very stylish
[/lang_en]

Packetlist for recovering an ubuntu

Author: stephan  |  Category: Linux

[lang_de]
Um z.B. einen zweiten Ubunturechner mit der gleichen Paketkonfiguration zu erstellen oder bei einer Neuinstallation des Systems schnell alle zuvor installierten Pakete zu übernehmen, kann man mit dem Befehl

dpkg –get-selections | awk ‚!/deinstall|purge|hold/ {print $1}‘ > packages.list

eine Liste packages.list zur Wiederherstellung der Pakete erzeugen.
Installation von Paketen aus einer Liste

Um alle in dieser Liste gespeicherten Pakete später zu installieren, gibt man folgenden Befehl ein:

xargs -a „packages.list“ sudo apt-get install

Funktioniert auch mit Debian
[/lang_de][lang_en]
To install onto a second Computer an Ubuntu with the same selection of packets or to have the same selcetion of packets, when reinstalling a system you have to enter

dpkg –get-selections | awk ‚!/deinstall|purge|hold/ {print $1}‘ > packages.list

for the backup.

To install this list you have to enter

xargs -a „packages.list“ sudo apt-get install

[/lang_en]

Vodafone VDSL via Linuxrouter

Author: stephan  |  Category: Linux, Netzwerk, vdsl

Seit zwei Tagen läuft nun mein VDSL fehlerfrei.
Der Anschluss ist ein Reselleranschluss via Telekom sodurch konnten mir existierende howtos [1] sehr gut als Hilfestellung dienen.
Eingerichtet habe ich das ganze auf meinem Router mit OpenSuse 10.2

Als erstes musste für eth0 ein Interface für vlan7 angelegt werden ( Vlan7 , da es ein Reselleranschluss via Telekom ist , vlan132 wäre die Alternative gewesen)


modprobe 8021q
vconfig add eth0 7
ip a a 192.168.7.99/24 dev eth0.7

Damit das Interface auch durch das System benutzbar ist habe ich es in /etc/sysconfig/network hinterlegt

cat /etc/sysconfig/network/ifcfg-eth0.7
BOOTPROTO='static'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR='192.168.7.99'
MTU=''
NAME=''
NETMASK='255.255.255.0'
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='auto'
USERCONTROL='no'
_nm_name='static-0'
PREFIXLEN=''

Meine Konfigurationsdatei für das dsl0 Interface

cat ifcfg-dsl0
BOOTPROTO='none'
DEVICE='eth0.7'
NAME='VDSL-Verbindung'
PPPD_OPTIONS=''
PPPMODE='pppoe'
PROVIDER='provider2'
STARTMODE='hotplug'
UNIQUE=''
USERCONTROL='no'
VPIVCI=''
MTU='1476'
MRU='1476'

Der Nutzername, den mir Vodafone übermittelte lautete
vb123456789
mit diesem bekam ich allerdings die Fehlermeldung „Acces denied“.

Der Username muss folgendermassen übermittelt werden,

vodafone.komplett/vb123456789

dann wählt sich der smpppd auch ein .

Das Resultat war zufriedenstellend.:

Stilltocome:
Reise ins VOIP Wunderland

[1]
Quellen:
======
http://www.pro-linux.de/news/1/11464/pro-linux-vdsl-modem-unter-linux.html
http://claus.freakempire.de/2009/02/17/t-home-vdsl-unter-debian-linux-einrichten-vlan-id-7-und-8/
http://claus.freakempire.de/2007/04/15/t-home-iptv-ohne-speedport-unter-linux-vdsl/

Sources for out of date Linuxsystems

Author: stephan  |  Category: Linux

[lang_de]
Wenn die Installation der Lieblingsdistribution in die Jahre gekommen ist steht man zum Teil vor grösseren probelem auch nur wenn ein paar Packete getauscht werden sollen.

Jede größere Distribution hat dafür eigene Quellen um dieses Problem zu lösen
1.) Debian
=========
http://www.debian.org/distrib/archive.de.html

die apt/sources.lst
solllte ungefähr folgendermassen verändert werden

deb http://archive.debian.org/debian/ hamm contrib main non-free

2.)Ubuntu
=========
Funktioniert wie bei Debian

http://old-releases.ubuntu.com/releases/

deb http://old-releases.ubuntu.com/ubuntu breezy main restricted universe multiverse

3.)SUSE
=======
Hier ist eine komplette Liste aller Quellen für nicht mehr unterstütze Releases.
Einfach statt der bisherigen Quelle eintragen

http://en.opensuse.org/Mirrors_discontinued_releases#openSUSE_10.2

[/lang_de][lang_en]
If the installed version of your favorite distribution isn’t supported anymore you’re even not able to reinstall some packets.

There are special Sources to solve this problem

1.) Debian
=========
http://www.debian.org/distrib/archive.de.html

change your apt/sources.lst
similar to this line

deb http://archive.debian.org/debian/ hamm contrib main non-free

2.)Ubuntu
========
Works like Debian
http://old-releases.ubuntu.com/releases/

deb http://old-releases.ubuntu.com/ubuntu breezy main restricted universe multiverse

3.)SUSE
=======
Here is a comlete list for all discntinued release.
Use it like a normal source
http://en.opensuse.org/Mirrors_discontinued_releases#openSUSE_10.2
[/lang_en]

howto connect a netbook and a mobile to use it as moden

Author: stephan  |  Category: Linux, Netbook, Netzwerk

[lang_en]
Bluetooth must be activated on the mobile and the netbook.
First we search for the mobile
hcitool scan
It had to look like this.
FF:FF:FF:FF:FF:FF Komunikator

To use it more simple . we put it into /etc/bluetooth/rfcomm.conf

rfcomm0 {
# Automatically bind the device at startup
bind yes;
# # Bluetooth address of the device
device FF:FF:FF:FF:FF:FF;
# # RFCOMM channel for the connection
channel 1;
comment "Handy";
}

then we can connect with
rfcomm connect 0

To setup the PPP connection I used the gnome-ppp. The way through the menu was system => settings => network settings.
There you should find a point „mobile internet“. For me it worked with the default settings.
You find your setting in

~/.gconf/system/networking/connections/

and the correct connection number.
[/lang_en]

[lang_de]
Bluetooth muss auf dem Handy und auf dem Netbook aktiviert sein .
Dann suchen wir das Handy mit folgendem Befehl.
hcitool scan
Die Anzeige müsste ungefähr so aussehen.
FF:FF:FF:FF:FF:FF Komunikator

Damit wir das einfacher nutzen können , binden wir das Handy in die Datei /etc/bluetooth/rfcomm.conf ein

rfcomm0 {
# Automatically bind the device at startup
bind yes;
# # Bluetooth address of the device
device FF:FF:FF:FF:FF:FF;
# # RFCOMM channel for the connection
channel 1;
comment "Handy";
}

Damit können wir uns jetzt mit dem Befehl
rfcomm connect 0
verbinden.

Zum einrichten der PPP Verbindung habe ich gnome-ppp genutzt . Dazu habe ich nun in den Netzwerkeinstellungen ( Der Weg: => System => Einstellungen => Netzwerkeinstellungen) im Reiter Mobiles Breitband diese eingerichteteingerichtet . Die Defaulteinstellungen haben bei mir schon funktioniert.
Die Einstellungen kann man in

~/.gconf/system/networking/connections/

und der richtigen Verbindungsnummer wiederfinden.
[/lang_de]

ftpsfs howto

Author: stephan  |  Category: Linux, Netzwerk

[lang_de]
Ich habe ein kleines NAS das ich bisher immer als Samba Share gemounted hatte. Da dies aber immer wieder Probleme machte habe ich nach einer neuen Möglichkeit gesucht .
Eine sehr schöne und einfache Variante ist mir curlftpfs untergegkommen .
Es wird das Packet curlftpfs benötigt ( Abhängigkeiten zu libfuse2 (FUSE=FileSystem im Userspace ))
Danach kann das ganze einfach gemounted werden
curlftpfs -o nonempty admin:passwort@192.168.1.91/PUBLIC/ /mount/
oder gar in die FSTAB integriert werden
curlftpfs#admin:passwort@192.168.1.91 /mount fuse rw,uid=500,user,noauto 0 0

[/lang_de]

[lang_en]
I own a little NAS which was mounted as samba share. This was not always sucessfull so I was looking for another way.
There ist a very nice alternative by using curlftpfs
I need the packet curlftpfst ( dependencies to libfuse2 (FUSE=FileSystem in Userspace ))
After installing you can mount it very easily
curlftpfs -o nonempty admin:passwort@192.168.1.91/PUBLIC/ /mount/
or integrate it even into fstab
curlftpfs#admin:passwort@192.168.1.91 /mount fuse rw,uid=500,user,noauto 0 0

[/lang_en]

virtual WLAN

Author: stephan  |  Category: Linux, Netzwerk, openwrt, Sonstiges

[lang_en]After failing to configure more than one wlan onto my new wrt160nl, I’ll tried the same with my old wrt54gl.

wrt54gl

The setup:
-One WLAN ( secure ) ,directly connected to my LAN
-One WLAN ( unsecure) , for testingpurpose only for a few hosts. This net wil be routed to the LAN.
The accessiblity will be managed by the Firewall and my dhcpd

The second wlan will simply added to /etc/config/wireless ( same physical interface)

config wifi-device wl0
option type broadcom
option channel 7
config wifi-iface
option device wl0
option network lan2
option mode ap
option ssid lulu
option encryption none
option hidden 1
option dns 192.168.1.1
option gateway 192.168.3.2
option dhcp 192.168.1.1
config wifi-iface
option device wl0
option network lan
option mode ap
option ssid lala
option encryption psk
option key secret
option hidden 1
option dns 192.168.1.1
option gateway 192.168.1.1
option dhcp 192.168.1.1

after a „wifi down && wifi up“ you’ll now see Interface wl0.1.
I had two change the following in the /etc/config/network
-I need a new vlan ( 2) . The Vlan1 was for the WAN Interface, the physical interface is now in VLAN 0 ( LAN) so I have 5 Interfaces for the LAN.
-For both WLANs you have to configure the bridge interfaces.
-under /etc/firewal.user you have to adapt the firewall .


#### VLAN configuration
config switch eth0
option vlan0 "0 1 2 3 4 5*"
option vlan1 "5*"
option vlan2 "5*"
#### Loopback configuration
config interface loopback
option ifname "lo"
option proto static
option ipaddr 127.0.0.1
option netmask 255.0.0.0
#### LAN configuration
config interface lan
option type bridge
option ifname "eth0.0"
option proto static
option ipaddr '192.168.1.98'
option netmask 255.255.255.0
option gateway '192.168.1.1'
option dns '192.168.1.1'
##### VLAN 2 , Bastenwlan
config interface lan2
option type bridge
option ifname "eth0.2"
option proto static
option ipaddr '192.168.3.2'
option netmask '255.255.255.0'
option dns '192.168.1.1'
option dhcp '192.168.1.1'

thats all
[/lang_en][lang_de]
Nachdem ich scheiterte, dem WRT160NL mehr wie ein Wlan beizubringen . Deswegen stürzte ich mich auf meinen alten Router WRT54gl und siehe da, es geht doch.

wrt54gl

Das Szenario:
-Ein WLAN ( sicher ) ,das direkt mit dem LAN verbunden ist
-Ein WLAN ( unsicher) , für Testzwecke, das in das Haupnetz geroutet wird und nur wenigen ausgesuchten Hosts offensteht ( durch den dhcp und die Firewall geregelt )

Unten die /etc/config/wireless in der das zweite wlan einfach hinzugefügt wird ( gleiches physkalisches Interface)


config wifi-device wl0
option type broadcom
option channel 7
config wifi-iface
option device wl0
option network lan2
option mode ap
option ssid lulu
option encryption none
option hidden 1
option dns 192.168.1.1
option gateway 192.168.3.2
option dhcp 192.168.1.1
config wifi-iface
option device wl0
option network lan
option mode ap
option ssid lala
option encryption psk
option key secret
option hidden 1
option dns 192.168.1.1
option gateway 192.168.1.1
option dhcp 192.168.1.1

nach einenm wifi down && wifi up ist nun das Interface wl0.1 entstanden.
In der /etc/config/network ist folgendes zu ändern.
-Ein neues vlan ( 2) ist anzulegen. Das Vlan1 war für das WAN Interface, da physikalischen Interface ist aber nun im VLAN 0 ( LAN). So habe ich in meinem WLAN 5 Interfaces
-Für die Beiden WLANs werden die beiden Bridge Interfaces konfiguriert.
-unter /etc/firewal.user ist noch die Firewall anzupassen.


#### VLAN configuration
config switch eth0
option vlan0 "0 1 2 3 4 5*"
option vlan1 "5*"
option vlan2 "5*"
#### Loopback configuration
config interface loopback
option ifname "lo"
option proto static
option ipaddr 127.0.0.1
option netmask 255.0.0.0
#### LAN configuration
config interface lan
option type bridge
option ifname "eth0.0"
option proto static
option ipaddr '192.168.1.98'
option netmask 255.255.255.0
option gateway '192.168.1.1'
option dns '192.168.1.1'
##### VLAN 2 , Bastenwlan
config interface lan2
option type bridge
option ifname "eth0.2"
option proto static
option ipaddr '192.168.3.2'
option netmask '255.255.255.0'
option dns '192.168.1.1'
option dhcp '192.168.1.1'

thats all
[/lang_de]

Howto let Nagios send documentationlinks

Author: stephan  |  Category: Linux, Nagios, Netzwerk

[lang_en]
If you use Nagios to monitor a lot of services and hosts , you want to link the Dokumentation to nagios and you want to see the Link also in the Notification email.

Whats the way to achieve this??

You can define a special Section in the configuration for Extended Information about Services . Into this section you have to put a Variable „action_url“ with the URL of your dokulink, Than you’ll find the Link on the webpage

define serviceextinfo{
host_name localhost
service_description some service
action_url http://link.to.doku
}

To see the Link also in the eMail you have to put the following


...
$SERVICEACTIONURL$ \n
...

into your notifcation Command.

2 additional notes:
1.)This will also work by using $SERVICENOTESURL$ but $SERVICENOTESURL$ is used by tools like nagiosgrapher. So use $SERVICEACTIONSURL$
2.)This will also work for $HOSTACTIONURL$
[/lang_en] [lang_de]
Wenn man nagios einsetzt um sehr viele Hosts und Dienste zu überwachen , wäre es schön wenn der Nagios im Störungsfall gleich die Doku zum enstprechenden Dienst mit verschickt.

Ich stand genau vor diesem Problem und habe nun diese Lösung gefunden .

Zur Konfiguration des Services wird nun eine Erweiterungsektion zum Service hinugefügt. In diese Sektion kommt eine Variable action_url mit einem Link auf die Doku.
Dann wird dieser Link auf jeden Fall schon auf Weboberfläche angezeigt.


define serviceextinfo{
host_name localhost
service_description some service
action_url http://link.to.doku
}

Damit er auch noch in der Mial zu sehen ist muss dem/den Notofikationkommando(s) noch folgendes hinzugefügt werden.

...
$SERVICEACTIONURL$ \n
...

Zwei Ergänzungen:
1.) Es wurde auch ,mit der Variable $SERVICENOTESURL$ funktionieren, die wird allerdings auch von Addons wie dem Nagiosgrapher genutzt.
2.)Für Hosts funktioniert das ganze gleich, da heisst die Variable $HOSTACTIONURL$
[/lang_de]

Ein neuer WLAN Router – der WRT160NL

Author: stephan  |  Category: Linux, Netzwerk, openwrt

Aus verschiedenen Gründen ( Speicher , Gigabit Ports ,.. ) und weil ich einfach auch ein Bastelwlan haben wollte ( das sollte dann der alte Router werden ) musste ein neuer Router her.
Eigentlich wollte ich ja einen , der zwei WLAns simultan kann egal ob physikalisch oder als virtueller Access Point.
Ausserdem sollte am besten Openwrt drauf laufen .
Diesen Alleskönner schien es nicht zu geben weswegen ich einen wrt160N bestellte.
Bekommen hatte ich allerdings einen wrt160NL.

Der Unterschied zwischen den Geräten erschloss sich mir erst beim Stöbern in der englischen wikipedia .
Der wrt160NL hat einen Atheroschip, dies kann VAP ermöglichen !!

Momentan bin ich nach diesem howto dabei, die Firmware zu bauen

Meine bisherigen Schritte

mkdir OpenWrt
cd OpenWrt/
svn co svn://svn.openwrt.org/openwrt/trunk/
cd trunk
svn up

sollte eine Versionsnummer von r17264 oder größer sein

./scripts/feeds update
make defconfig
make package/symlinks
make menuconfig

Im Menü habe ich als Target System ar71xx und als Target Profil wrt160nl eingestellt.
Momentan läuft das

make

noch