Logserver with Elasticsearch / Logstash / Rsyslog / Kibana on Ubuntu 14.04

In this Documentation I will show how to install and configure Elasticsearch (Log Store and search) / Logstash (Log forwarder) / Rsyslog (Syslog) / Kibana (Web GUI).

Logstash will get the Logs from Rsyslog, with this setup it is possible to send standard syslog to the Logserver.

The goal is to use whenever possible Repositories so that we can do easy upgrades via apt-get && apt-get upgrade of the packages.

Continue reading “Logserver with Elasticsearch / Logstash / Rsyslog / Kibana on Ubuntu 14.04”

Howto Install MIBs in Ubuntu

Install MIBS downloader

sudo apt-get install snmp-mibs-downloader
sudo cp /usr/share/doc/snmp-mibs-downloader/examples/cisco* /etc/snmp-mibs-downloader/
cd /etc/snmp-mibs-downloader && sudo gzip -d ciscolist.gz

change /etc/snmp-mibs-downloader/snmp-mibs-downloader.conf to

AUTOLOAD="rfc ianarfc iana cisco"

change /etc/snmp-mibs-downloader/cisco.conf to


edit /etc/snmp-mibs-downloader/ciscolist and remove lines containing


Start downloading all the configured MIBs

sudo download-mibs

Install SNMP Tools

sudo apt-get install snmp

To use the MIB Files comment the following out /etc/snmp/snmp.conf

mibs :

Link: http://x123.net/howto-cisco-mibs-ubuntu.html

Setup SNMP Tools / OID Conversion check

If you ever have setup an snmp client on a Linux System you know how difficult it is to get SNMP Mibs, do the OID Translation etc.

The following shows howto setup SNMP on a Ubuntu Linux Host

Setup SNMP

apt-get install snmp

Comment out the line mibs : in the file /etc/snmp/snmp.conf

OID Conversion check

In its simplest form, snmptranslate takes a numeric OID and displays the corresponding textual MIB name

# snmptranslate .

It can also perform the reverse translation, taking the textual MIB name and displaying the numeric OID. This uses the -On flag

# snmptranslate -On SNMPv2-MIB::sysUpTime.0

There are several other ways of displaying an OID. One of these is to show the full list of MIB subidentifier names, using the -Of flag

# snmptranslate -Of SNMPv2-MIB::sysUpTime.0

Note that these flags determine how the OID should be displayed, regardless of how it was originally specified

# snmptranslate .iso.3.6.1.private.enterprises.2021.2.1.prNames.0
# snmptranslate -On .iso.3.6.1.private.enterprises.2021.2.1.prNames.0
# snmptranslate -Of .iso.3.6.1.private.enterprises.2021.2.1.prNames.0

Specifying a MIB object

The examples above identified a particular object, either by providing the full list of MIB subidentifiers (numeric, textual or a mixture), or by specifying the relevant MIB module containing the desired MIB object. However MIB objects are guaranteed to be unique within IETF standard MIBs (and are rarely duplicated across vendor-supplied MIBs either). So it would usually be sufficient to simply give the bare MIB object name, with no further qualifications. snmptranslate uses the -IR flag to do this "random-access" lookup

# snmptranslate sysUpTime.0
Invalid object identifier: sysUpTime.0
# snmptranslate -IR sysUpTime.0

(The other commands do this by default – only snmptranslate needs it to be explicitly turned on).

It's even possible to provide a regex pattern, and have snmptranslate (or the other command-line tools) do a "best-match" search to find the appropriate MIB object. This uses the -Ib flag

# snmptranslate -TB 'sys.*ime'

Further Information

To get extended information about a particular MIB node, use the -Td flag to display the full description from the MIB file

# snmptranslate -On -Td SNMPv2-MIB::sysUpTime
  -- FROM    SNMPv2-MIB, RFC1213-MIB
  SYNTAX    TimeTicks
  MAX-ACCESS    read-only
  STATUS    current
  DESCRIPTION    "The time (in hundredths of a second) since the
            network management portion of the system was last
::= { iso(1) org(3) dod(6) internet(1) mgmt(2) mib-2(1) system(1) 3 }

This can be combined with the other flags described earlier

# snmptranslate -On -Td -IR sysUpTime
# snmptranslate -On -Td -Ib 'sys.*ime'

to give the same results.

Finally, it's possible to display a formatted diagram of a selected subset of the MIB tree, using the -Tp flag

   # snmptranslate -Tp -IR system
      +-- -R-- String    sysDescr(1)
      |        Textual Convention: DisplayString
      +-- -R-- ObjID     sysObjectID(2)
      +-- -R-- TimeTicks sysUpTime(3)
      +-- -RW- String    sysContact(4)
      |        Textual Convention: DisplayString
      +-- -RW- String    sysName(5)
      |        Textual Convention: DisplayString
      +-- -RW- String    sysLocation(6)
      |        Textual Convention: DisplayString
      +-- -R-- Integer   sysServices(7)
      +-- -R-- TimeTicks sysORLastChange(8)
      |        Textual Convention: TimeStamp
            +-- ---- Integer   sysORIndex(1)
            +-- -R-- ObjID     sysORID(2)
            +-- -R-- String    sysORDescr(3)
            |        Textual Convention: DisplayString
            +-- -R-- TimeTicks sysORUpTime(4)
                     Textual Convention: TimeStamp

This shows the accessibility (read-only, or read-write), syntax, name and subidentifier of each MIB object within the specified subtree, together with the internal structure of those MIB objects.

Running snmptranslate -Tp without an OID argument will display this information for the known MIB tree in its entirety.

Link: http://www.net-snmp.org/wiki/index.php/TUT:snmptranslate

Mobile Internet Connect via Bluetooth

The following describes howto activate a connection between a ubuntu linux desktop and a bluetooth mobile device. The example script /etc/chatscripts/bluetoothconn is created for swisscom connection. The script will be adaptable for other providers without any problems.

Thanks for Patrick for his help.

Bluetooth History


Harald Bluetooth


Harald Bluetooth



Packets to install (Ubuntu 7.10)

Optional Packets:

  • bluetooth
  • bluez-utils
  • bluez-pin (ev. nicht in Repo)

You have to install the following packets:

  • gnome-vfs-obexftp

Install it with sudo apt-get install gnome-vfs-obexftp

Scripts and Config Files


'' 'AT'
OK 'AT &F'
# the next 2 lines are voodoo taken from the windows
# init script provided by Sony Ericsson. Don't know
# if this is necessary for other devices.
OK 'AT V1E0S0=0&D2&C1'
OK 'AT E1'
OK 'AT+CGDCONT=1,"IP","gprs.swisscom.ch"'
OK 'ATD*99***1#'
SAY "\nConnected."


# Most GPRS phones don't reply to LCP echo's
#lcp-echo-failure 10000
#lcp-echo-interval 1000

lcp-echo-failure 0
lcp-echo-interval 0

# Keep pppd attached to the terminal:
# Comment this to get daemon mode pppd

# Debug info from pppd:
# Comment this off, if you don't need more info

# Show password in debug messages

# Connect script:
# scripts to initialize the GPRS modem and start the connection,
# wvdial command is for Orange SPV while other phones should work with chat
#connect /etc/ppp/peers/gprs-connect-chat

#connect "/usr/bin/wvdial --chat --config /etc/ppp/peers/umts-wvdial.conf radiolinja_usb_orange_spv"
connect "/usr/sbin/chat -v -f /etc/chatscripts/bluetoothconn"

# Disconnect script:
# AT commands used to 'hangup' the GPRS connection.

#disconnect /etc/ppp/peers/gprs-disconnect-chat

# Serial device to which the GPRS phone is connected:
/dev/rfcomm0  # USB serial device, for example Orange SPV

# Serial port line speed
115200  # fast enough

# Hardware flow control:
# Use hardware flow control with cable, Bluetooth and USB but not with IrDA.
crtscts  # serial cable, Bluetooth and USB, on some occations with IrDA too

#nocrtscts # IrDA

# Ignore carrier detect signal from the modem:

# IP addresses:
# - accept peers idea of our local address and set address peer as
# (any address would do, since IPCP gives to it)
# - if you use the 10. network at home or something and pppd rejects it,
# change the address to something else


# pppd must not propose any IP address to the peer!

# Accept peers idea of our local address

# Add the ppp interface as default route to the IP routing table

# Newer pppd's also support replacing the default route, if one is
# already present, when the GPRS connetion should be set as the default route
# to the network


# DNS servers from the phone:
# some phones support this, some don't.

# ppp compression:
# ppp compression may be used between the phone and the pppd, but the
# serial connection is usually not the bottleneck in GPRS, so the
# compression is useless (and with some phones need to disabled before
# the LCP negotiations succeed).


# The phone is not required to authenticate:

# Username and password:
# If username and password are required by the APN, put here the username
# and put the username-password combination to the secrets file:
# /etc/ppp/pap-secrets for PAP and /etc/ppp/chap-secrets for CHAP

# authentication. See pppd man pages for details.
# Example, Radiolinja operator pap-secrets:
# "rlnet"         *       "internet"  *

user "gprs"

# The persist tries to reopen the connection if it is dropped. This
# is usefull for example with a Nokia 7650 which only manages to
# 'dial' with every second attempt or when the network likes to drop the
# connection every now and then. It's not fun when the over-night
# 'apt-get dist-upgrade -d -y' fails constantly...


#maxfail 99

# Asyncmap:
# some phones may require this option.
#asyncmap 0xa0000

# No magic:
# some phones may require this option.

# Require PAP authentication:
# some phones may require this option.

Make a connection

With the bluetooth applet (Default Installation Ubuntu), browse devices and connect to your device in the list. When you connect to the device you have to enter a PIN on both sides.


  • Browsing for device


  • Pairing with device


  • Enter PIN


Find MAC Address

$ hcitool scan
Scanning ...
        00:1A:6B:E3:1F:2A       WSMOB705
        00:1B:FB:1C:45:52       NB003
        00:12:D1:6D:1C:07       Harald

Find Channel (DUN)

The following shows more informations about DUN (Dial Up Networking). Important is the channel, normally it is channel 2.

$ sdptool search DUN
Inquiring ...
Searching for DUN on 00:12:D1:6D:1C:07 ...
Service Name: Dial-Up Networking
Service RecHandle: 0x100b3
Service Class ID List:
  "Dialup Networking" (0x1103)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 2
Language Base Attr List:
  code_ISO639: 0x454e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "Dialup Networking" (0x1103)
    Version: 0x0100

Connect to mobile device

Linux created a new device /dev/rfcomm0, a virtual device.
Check if the virtual device is available otherwise do a /etc/init.d/bluetooth restart

$sudo rfcomm bind 0 00:12:D1:6D:1C:07 2

#        bind       [channel]       Bind device
#        release                            Release device
#        show                               Show device

Connection status

$ rfcomm -a
rfcomm0: 00:12:D1:6D:1C:07 channel 2 closed

Make Connection

pon bluetoothconn;plog -f

Stop Connection


Ubuntu: Install on eeePC 901

WLAN und LAN Konfiguration EEEPC 901 Ubuntu (WLAN mit AWUS036H USB Wlan (ALFA) support)


! Achtung, die Anleitung gilt nur für den 901, ev. 1000. der EEEPC900 verwendet einen anderen WLAN Chip.
Bei der Installation von Ubuntu 8.04 werden einige Devices nicht richtig erkannt.
Es gibt verschiedene Möglichkeiten um LAN, WLAN etc. zum funktionieren zu bewegen.
Weg 1: Adams eeepc Kernel für Ubuntu 8.04 [1] – leider fehlt da die Unterstützung für die AWUS036H die im Originalkernel 2.6.24-21 enthalten ist, Treiber muss also von Hand wieder installiert werden [2] oder besser [3]

Oder das ganze von Hand mit Original Kernel:

Download Treiber [4] bei Ralink

tar -jxf 2008_0708_RT2860_Linux_STA_v1.7.0.0.tar.bz2
cd 2008_0708_RT2860_Linux_STA_v1.7.0.0
vi os/linux/config.mk

dort folgende Zeilen ändern


und jeweils das "n" durch ein "y" ersetzen, ansonsten erkennt des NetworkManager Applet das Interface nicht.

sudo make
sudo make install

Danch rebooten, WLAN sollte funktionieren.


Treiber gibts bei ASUS

cd l1e-l2e-linux-v1.0.0.4
cd src
sudo make KBUILD_NOPEDANTIC=1 install

Damit der Treiber auch jedesmal geladen wird

 sudo depmod -ae


Um die ganzen Hotkeys zum laufen zu bringen, gibt es diverse Scrips, z.B:

Ubuntutweak, für 901 sollte der WLAN Teil im Scrips (madwifi) ausgeklammert werden



Adams Ubuntu EEE Kernel installieren und die [5] version für die externe Alfa. So brauchts keine weiteren Patchereien für Keys und internes LAN/WLAN


Weitere Links zum Thema:
Installationsanleitung für Ubuntu auf EEEPC mit alternativem Desktop

Ubuntu – apt-get – “Some upgrades show packages being kept back”

If the dependencies have changed on one of the packages you have installed so that a new package must be installed to perform the upgrade then that will be listed as "kept-back".

root@sun:~# apt-get upgrade
Building Dependency Tree... Done
The following packages have been kept back:
  bind9-host dnsutils imagemagick libmagick6
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.

There we can see four packages haven't been upgraded, even though newer packages are available. This is because two new packages were introduced, and these upgrades depend upon it.
To fix this you must run :

 apt-get dist-upgrade

'apt-get dist-upgrade'ing also installs new packages brought in the chain of dependencies, whereas 'apt-get upgrade'ing only install newer versions of packages already installed.


Debian Administration – Some upgrades show packages being kept back

Ubuntu 8.04 external 1680×1050 ACER x223wq


HP nc6320 with Ubuntu 8.04
External Sceen Acer x223wQ


  • vi 🙂
  • xrandr (optional – not realy needed)
  • 915resolution

Setting GMA 950 Bios Settings

  • List available modes
 sudo 915resolution -l

because 1680×1050 is not available we replace a not used resolution, for example number 34:

sudo 915resolution 34 1680 1050 34

sudo 915resolution

check if everything is OK by using

sudo 915resolution -l

again. Should look something like that (do not overwrite the 1400×1050 because it is used for the HP LCD Screen)


Chipset: 945GM

Mode 30 : 640x480, 8 bits/pixel
Mode 32 : 800x600, 8 bits/pixel
Mode 34 : 1680x1050, 32 bits/pixel
Mode 38 : 1280x1024, 8 bits/pixel
Mode 3a : 1600x1200, 8 bits/pixel
Mode 3c : 1680x1050, 8 bits/pixel
Mode 41 : 640x480, 16 bits/pixel
Mode 43 : 800x600, 16 bits/pixel
Mode 45 : 1400x1050, 16 bits/pixel
Mode 49 : 1280x1024, 16 bits/pixel
Mode 4b : 1600x1200, 16 bits/pixel
Mode 4d : 1680x1050, 16 bits/pixel
Mode 50 : 640x480, 32 bits/pixel
Mode 52 : 800x600, 32 bits/pixel
Mode 54 : 1400x1050, 32 bits/pixel
Mode 58 : 1280x1024, 32 bits/pixel
Mode 5a : 1600x1200, 32 bits/pixel
Mode 5c : 1400x1050, 32 bits/pixel

!! 915resolution's modifications of the BIOS are transient (see below)


 sudo vi /etc/X11/xorg.conf
Section "InputDevice"
	Identifier	"Generic Keyboard"
	Driver		"kbd"
	Option		"XkbRules"	"xorg"
	Option		"XkbModel"	"pc105"
	Option		"XkbLayout"	"ch"
	Option		"XkbOptions"	"lv3:ralt_switch"

Section "InputDevice"
	Identifier	"Configured Mouse"
	Driver		"mouse"
	Option		"CorePointer"

Section "InputDevice"
	Identifier	"Synaptics Touchpad"
	Driver		"synaptics"
	Option		"SendCoreEvents"	"true"
	Option		"Device"		"/dev/psaux"
	Option		"Protocol"		"auto-dev"
	Option		"HorizEdgeScroll"	"0"

Section "Device"
	Identifier	"Configured Video Device"
	Driver "i810"
	BusID "PCI:0:2:0"
	#Option "Clone" "true"
	Option      "MonitorLayout" "CRT,LFP"
	Screen 0

Section "Device"
	Identifier	"VGA_out"
	Driver "i810"
	BusID "PCI:0:2:0"
	Option "MonitorLayout" "LFP,CRT"
  	Screen      1

Section "Monitor"
	Identifier	"Configured Monitor"
	Option      "DPMS"
  HorizSync       30-65
  VertRefresh     50-75

Section "Monitor"
	Identifier  "Configured Monitor1"
	Option      "DPMS"

Section "Screen"
	Identifier	"Default Screen"
	Monitor		"Configured Monitor"
	Device		"Configured Video Device"
	DefaultDepth 24
	SubSection "Display"
            Depth 24
            Modes "1400x1050"

Section "Screen"
	Identifier	"External Screen"
	Monitor		"Configured Monitor1"
	Device		"VGA_out"
	DefaultDepth 24
            SubSection "Display"
            Depth 24
	Modes "1680x1050"
	Option "ModeValidation" "NoDFPNativeResolutionCheck"

Section "ServerFlags"
  DefaultServerLayout "Default Layout"

Section "ServerLayout"
	Identifier	"Default Layout"
	#Screen		"Default Screen"
	InputDevice	"Synaptics Touchpad"
	Screen 0	"Default Screen"
	Screen 1    	"External Screen" LeftOf "Default Screen"
	Option      	"Xinerama" "false"

Make changes persistent

Assuming you've set up your xorg.conf correctly, you should be able to restart X.
To make this happen every time you startup, put the 915resolution command in /etc/init.d/gdm right after the line:

log_begin_msg "Starting GNOME Display Manager…"

(without sudo)

Check Results

you can check the results by using the xrandr tool:

$ xrandr
Screen 1: minimum 640 x 480, current 1680 x 1050, maximum 1680 x 1050
default connected 1680x1050+0+0 (normal left inverted right) 0mm x 0mm
   1680x1050      60.0*
   1280x1024      75.0
   800x600        75.0
   640x480        75.0


Ubuntu 9.04 – change HD encryption (LUKS) password

How to change HD encryption (LUKS) password in Ubuntu

change key

 cryptsetup -y luksAddKey /dev/sda1
:~$ sudo cryptsetup -y luksAddKey /dev/sda1
Enter any LUKS passphrase:
key slot 0 unlocked.
Enter new passphrase for key slot:
Verify passphrase:
Command successful.

Reboot the machine.

Delete a key:

 cryptsetup luksDelKey /dev/sda5 NUMBER

where NUMBER is the key slot number ie. 'cryptsetup luksDelKey /dev/sda1 0'