Windows 2008 routing weirdness

This happened to me the other day: I was called to see why a newly installed Windows 2008 machine could not see anything beyond the default gateway. After playing point-and-click for some time, I resorted to the command line. Issuing an ipconfig command revealed that the machine had two default gateways on the same interface and with the same metric. The correct one (let’s call it 192.168.1.254) plus 0.0.0.0:

Default Gateway . . . . . . . . . : 0.0.0.0
                                    192.168.1.254

After some tcpdumping it seems that when having two default gateways and with the same metric, Windows 2008 does not randomly chooses one of them for every packet, rather it tries to send every packet through the smallest one (zero in this case). To resolve the problem one executes the following commands:

route delete 0.0.0.0
route -p add 0.0.0.0 mask 0.0.0.0 192.168.1.254 metric 1

The -p switch is need to make the route change permanent across reboots.

xscreensaver and xfce4 on Lenny

It seems that the default installation of xfce4 on Debian Lenny does not start the xscreensaver daemon by default. After looking here and there (mostly in Ubuntu forums) and reading the X startup scripts, I resolved the problem by simply creating $HOME/.xsession as follows:

#!/bin/bash
(sleep 5; /usr/bin/xscreensaver -no-splash) &
/usr/bin/startxfce4
/usr/bin/xscreensaver-command -exit

PS: I use xdm

“Patch! Patch! Patch!”

Το 2001 στα πλαίσια του IT Security Conference (που αργότερα εξελίχθηκε στο Cyprus InfoSec) ο Richard Cross έκανε την καλύτερη παρουσίαση.

Δεν θυμάμαι τον τίτλο, ούτε το περιεχόμενο, όμως σίγουρα όποιος την είδε θα σας πει το ίδιο: Ήταν η καλύτερη παρουσίαση, γιατί είχε ένα μήνυμα και όλοι μα όλοι το θυμούνται καλά:

Remember people; Patch! Patch! Patch!

Δε θυμάμαι πόσες φορές το είπε. Το είπε αρκετές και παραστατικά, γιατί αμέσως μετά, όποιος πήγαινε να του μιλήσει δεν του έλεγε “Hi!”, του έλεγε “Patch! Patch! Patch!”.

Αργότερα μου είπε πως:

Έχω καταλάβει πως αν θέλεις να μείνει κάτι από αυτά που λές, πρέπει να το λες τρεις φορές.

Μία λέξη · δύο μαθήματα.

(Σε συνέχεια του προηγούμενου post)

Portable Applications

Η πρώτη φορά που άκουσα για το concept των portable applications on-a-stick ήταν όταν ο φίλος μου ο Γιάννης, (τότε ΠΔ/407 σε κάποιο περιφερειακό πανεπιστήμιο) μου είπε:

– Φίλε Γιώργο, βρήκα τρόπο να κουβαλάω τη δουλειά μου μαζί χωρίς να την έχω σε laptop.

Αυτό ήταν πολλά χρόνια πριν και ο Γιάννης αφιέρωνε χρόνο και κόπο για να συντηρεί το USB stick που είχε όλα τα απαραίτητα προγράμματα για τη δουλειά του, ώστε να είναι πάντα επίκαιρα (τελευταία έκδοση). Από τότε έχει περάσει πολύς καιρός και έχουν εμφανιστεί λύσεις που κάνουν αυτή την απαίτηση πιο εύκολη, όπως π.χ. το MokaFive, το Ceedo, το MojoPac και το Tiny USB Office. Νομίζω όμως πως η σουίτα των PortableApps.com αξίζει ιδιαίτερης αναφοράς καθώς έχει τον πιο απλό τρόπο εγκατάστασης, τόσο του control panel της, όσο και των ίδιων των υποστηριζόμενων εφαρμογών.

Ακόμα περισσότερο, το control panel του PortableApps.com δεν το έχω εγκατεστημένο μόνο σε ένα USB stick, αλλά και στο PC μου για τον απλό λόγο, πως εάν θέλω να κάνω ένα δοκιμαστικό install κάποιας υποστηριζόμενης εφαρμογής, είναι ευκολότερο το uninstall της από το PortableApps.com παρά από τον uninstaller κάθε εφαρμογής, που μπορεί να αφήνει πίσω του χύμα DLLs και λοιπά αρχεία.

Έτσι και σε συνδιασμό με το alpine και το putty μπορεί κανείς να έχει ένα καλό working environment το οποίο να μπορεί να χρησιμοποιήσει από υπολογιστή που δεν είναι δικός του αλλά τον εμπιστεύεται. Στο δικό μου stick επίσης έχουν σπίτι το wget, ένα binary του micro emacs από τη Digital Mars και η embedded έκδοση του Damn Small Linux που τρέχει από το QEMU. Σκέφτομαι επίσης να προσθέσω και το Tclkit Portable Python για να έχω μια γλώσσα προγραμματισμού πρόχειρη.

Για ιστορικούς και μόνο λόγους κατοικεί και ένα VisiCalc.

Returning to my roots

From my /boot/grub/menu.lst:

title        FreeBSD
root        (hd0,2,a)
kernel      /boot/loader

As a side note, if you want to install FreeBSD 7.0-RELEASE on a VirtualBox virtual machine, you have to use the Intel PRO/1000 MT Desktop network card instead of the default one (PCnet-FAST III). VirtualBox’s DHCP server does not seem to cooperate with FreeBSD and PCnet-FAST III.

lenny rc1 and bnx2

Some time ago reader Max commented on using package firmware-bnx2 when having problems with lenny and bnx2 NICs.

On Friday I was installing lenny RC1 on a Dell server that has such interfaces. Conviniently the RC1 (as opposed to the beta 1) installer stopped and requested the network card’s firmware if it was available. I placed the firmware in a USB stick, plugged it in on the server, let the installer locate it on the stick and the installation continued like a charm. Here are the needed steps:

  1. On a working lenny machine change your /etc/apt/sources.list to include the non-free repository. For example:

    deb http://ftp.gr.debian.org/debian/ lenny main contrib non-free
    deb http://security.debian.org/ lenny/updates main contrib non-free

  2. As root run apt-get install firmware-bnx2 and then
  3. copy /lib/firmware/bnx2-* to the USB stick.

Now you can happily continue your installation and spread the Debian virus.

Virtual Box

Virtual Box rules! Ειδικά εάν είσαι compulsive formatter όπως εγώ, δε χρειάζεται να καταστρέφεις το host system. Υπάρχουν άπειρα configurations για επαναλαμβανόμενα installs για να πειραματιστείς στο guest system.

Ώρα να ξαναπαίξω με τα Minix3, Plan9 και Inferno