Aug 182009
 

When I inserted a new network card into my Linux computer, the new network interface was named with an incremented number at the end. I didn’t want that as my network setup (firewall rules etc.) were set up for the former name. So I had to change the configuration to rename the new interface.

I found the found the configuration file where the names of the network devices are saved using this command:

cd /etc/
ls `sudo find . -type f -print  |xargs grep -l -s "eth2"`

So I edited the file:

Aug 182009
 

run netstat like this:

sudo netstat -lntup

and you get an output like this:

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:8000            0.0.0.0:*               LISTEN      3688/icecast2   
tcp        0      0 0.0.0.0:5552            0.0.0.0:*               LISTEN      2955/tprintdaemon
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      2968/sshd       
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      4087/cupsd      
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      3202/postgres   
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      3519/exim4      
tcp        0      0 0.0.0.0:7100            0.0.0.0:*               LISTEN      3859/xfs        
tcp6       0      0 :::139                  :::*                    LISTEN      3776/smbd       
tcp6       0      0 :::80                   :::*                    LISTEN      4279/lighttpd   
tcp6       0      0 :::22                   :::*                    LISTEN      2968/sshd       
tcp6       0      0 :::7100                 :::*                    LISTEN      3859/xfs        
tcp6       0      0 :::445                  :::*                    LISTEN      3776/smbd       
udp        0      0 141.12.116.210:137      0.0.0.0:*                           3772/nmbd       
udp        0      0 192.168.102.33:137      0.0.0.0:*                           3772/nmbd       
udp        0      0 0.0.0.0:137             0.0.0.0:*                           3772/nmbd       
udp        0      0 141.12.116.210:138      0.0.0.0:*                           3772/nmbd       
udp        0      0 192.168.100.33:138      0.0.0.0:*                           3772/nmbd       
udp        0      0 0.0.0.0:138             0.0.0.0:*                           3772/nmbd       
udp        0      0 0.0.0.0:68              0.0.0.0:*                           7082/dhclient   
udp        0      0 0.0.0.0:68              0.0.0.0:*                           5550/dhclient   
udp        0      0 0.0.0.0:50503           0.0.0.0:*                           4028/avahi-daemon: 
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           4028/avahi-daemon:

alternatively do also a reverse DNS lookup:

Aug 182009
 

This article is about the data consistency health of your Raid. To check the physical health of the HDDs please use smartmontools to check the SMART status of your hard drives.

The simplest possibility to find out something about the status is to read the content of the special file /proc/mdstat:

cat /proc/mdstat

The output looks like:

Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md1 : active raid1 sdb2[1] sdc2[0]
      488022464 blocks [2/2] [UU]

md0 : active raid1 sdb1[1] sdc1[0]
      104320 blocks [2/2] [UU]

unused devices: <none>

And for more details you can run

Aug 182009
 

To get my cherry G85 to work properly including the additional audio keys I have to do the following:

To change the channels which your MM keys control, go to your main Gnome menu and find: Applications → System Tools → Configuration Editor (gconf-editor)

  • Set the value of /desktop/gnome/sound/default_mixer_device to alsamixer:hw:0
  • Edit /desktop/gnome/sound/default_mixer_tracks and change it to whatever channels you want.
    It should be set to [Master Mono] if you haven’t ever changed it. When set to [Master Mono, Master] the volume keys on the keyboard control both of those channels.
Aug 182009
 

http://deice.daug.net/netcat_speed.html
http://www.linuxhomenetworking.com/forums/showthread.php?t=18736
http://lxer.com/module/forums/t/26336/
good (short!): http://www.odium.com.au/?p=78

listen on machine A:

nc -v -v -l -n -p 2222 >/dev/null

on newer versions of netcat (Ubuntu 10.04) you must use

nc.traditional -v -v -l -n -p 2222 >/dev/null

Send from machine B:

time yes|nc -v -v -n tklaus.selfip.org 2222 >/dev/null

waiting a bit, then hit Ctrl+C and get something like:

real    0m55.098s
user    0m4.579s
sys     0m2.301s

on machine A you see

sent 0, rcvd 355480892

calculate: google tells us that 355480892 bytes / 55.09 seconds in Mbps is: (355 480 892 bytes) / (55.09 seconds) = 49.2304225 Mbps NOTE that the above result was without the -n switch on the server side (machine A).

Aug 182009
 

https://help.ubuntu.com/community/DynamicDNS
http://wiki.ubuntuusers.de/DynDNS-Clients

Install ddclient:

sudo aptitude install ddclient

Now configure the program:

sudo gedit /etc/ddclient.conf

Enter your DynDNS account data and computer setup:

pid=/var/run/ddclient.pid
protocol=dyndns2
use=if, if=eth2 # the mode and network interface
# DynDNS account:
server=members.dyndns.org
login=philippk
password='sdf1dpw'
philippk.ath.cx

And set ddclient to run automatically on startup:

sudo gedit /etc/default/ddclient

Set the mode of ddclient to something like this:

run_ipup="false"
run_daemon="true"
daemon_interval="600" # update interval in seconds
VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
Aug 182009
 

tinc is a Virtual Private Network (VPN) daemon that uses tunnelling and encryption to create a secure private network between hosts on the Internet. It runs on many platforms including Linux, FreeBSD, OpenBSD, NetBSD, MacOS/X, Solaris, Windows 2000, XP, Vista and Windows 7.

The installation of tinc on Ubuntu Linux is as simple as:

sudo aptitude install tinc

resources