Categories
Networking Routers

OpenWRT and DNS UPDATE

I’m hosting my domain myself on a dedicated root server, and I wanted my Internet router to automatically update a hostname in my own domain (in a designated dynamic zone) with my current public IP. With OpenWRT this was easily accomplished. I used these instructions as a starting point.

When trying to check whether everything was set up correctly I always got some strange error from the following command:

# ACTION=update INTERFACE=wan /sbin/hotplug-call iface

It turned out that the following statement

config_get ipaddr wan ipaddr

did not return the currently assigned IP address in my case, but just an empty response, so I got the following error message:

could not read rdata
syntax error

(For testing I hooked a spare router with a fresh OpenWRT install with the WAN port into my LAN, and configured the WAN interface to receive its IP address via DHCP from out of the LAN. In “production” the WAN interface receives its IP via PPPoE.)

Some friendly guy in the OpenWRT forum suggested I try the following instead:

. /lib/functions/network.sh
network_get_ipaddr ipaddr wan

And indeed this worked well.

Categories
Security

PayPal-Sicherheitsschlüssel

Gestern wollte ich während eines Bestellvorgangs mit PayPal bezahlen als ich feststellte, dass mein PayPay-Sicherheitsschlüssel nicht mehr funktionierte. Egal wie oft ich den Knopf zur Anzeige eines Sicherheitscodes drückte, das Display blieb ohne Funktion, das Gerät war wie “tot”.

Es handelt sich bei meinem Modell noch um den ursprünglichen Schlüssel (und nicht den neuen im Kreditkartenformat), der eine gewisse Ähnlichkeit mit den ersten RSA SecurID-Tokens hat:

Das Teil war jetzt über sechs Jahre alt, daher ging ich davon aus, dass schlicht und einfach die Batterie leer war. Da ich nicht riskieren wollte dass mein Bestellvorgang wegen Inaktivität abgebrochen wurde, wollte ich den Schlüssel möglichst schnell “reparieren”.

Categories
Debian

Solved: WordPress on Debian and media uploads not working

I was struggling with a problem that I couldn’t upload media files to my blog — which I host myself on a Debian box in a multi-site configuration. When I tried to do so I got an error message saying that WordPress couldn’t write to the directory. Actually I had this very problem since 2005 when I started this blog — I never took the time to really investigate it (but used the work-around to refer to static content I manually uploaded to my web-server document directory)… 😉

Now that my wife wanted to start blogging, I finally had a good reason to fix this issue. It took me about an hour, and it was done. What I had to do was just two entries in my admin’s Settings (I might not have set up WordPress cleanly when I started it, so you might not have to manually set this) as follows:

And then I needed one Alias in my Apache configuration to redirect the URL prefix to a directory under my web-server document root:

# "Intercepts" files prefix and redirect to "local" (user's) directory
Alias /blog/files /home/rabe/var/www/bergs.biz/blog/files
# This is the prefix to the root of my blog
Alias /blog /usr/share/wordpress

That’s it! Sometimes things are so easy, and it only takes a short while to fix them… 😉

Categories
Computers Windows

How to add another language to Microsoft Office 2010…

I usually prefer to use English versions of all operating systems and applications I use — simply because the German translations are usually horrible, plus very often updates for English versions become available much earlier (if at all!) than for localized versions.

Now I just bought myself Office 2010 and found that it lacked proofing tools for German — call me naive but I expected that these “common” tools were available in all or at least major languages. Duh! 🙁

So what I did is to download the German office installation package from Microsoft and started SETUP.EXE. To my surprise adding German as a proofing language was simpler than I even thought. After a while Setup properly showed me

  • all the components I had already installed,
  • the language English I had installed, plus
  • German as an optional (UI!) language to install, and
  • in the packages section another German proofing tools package appeared that I could then install.

Maybe the above is obvious to all or most of you, but I thought it’s not exactly that so I’d create a post about it to help people who are in the same situation as I was.

Enjoy!

Categories
Security

Data Privacy issue: Your Android phone might leak your IMEI…

Just played around with a new home router and noticed that my HTC Desire S Android phone sends the following hostname when requesting an IP address with DHCP in a wireless network:

Android_3567080XXXXXXXX

Why is this is a problem? Because the trailing part of that hostname is your IMEI, which is a unique number identifying your device. It’s normally only seen on radio-network level, so can normally be considered “private” (because your operator can’t disclose it to anyone).

The IMEI also contains a component called “TAC” (type allocation code) which identified the exact handset model you have.

So if you regularly visit Internet cafes or the like, these guys know how often and when you are there.

Please let me know whether you consider this a problem or not — I do think it is one.

Categories
Computers Debian Linux Security

Integrate “AVG Anti-Virus Free Edition” into Exim with ExiScan patch

If you would like to integrate “AVG Anti-Virus Free Edition” into Exim, using the ExiScan patch, this is actually quite easy.

Just insert the following fragment into your Exim config:

  # Reject virus infected messages.
  # Add message to implicit X-ACL-Warn: header
  warn  message         = This message contains malware ($malware_name)
        set acl_m0      = cmdline:\
                          /usr/bin/avgscan --arc %s; echo -e \N"\navg_retval $?"\N:\
                          avg_retval 5:\
                          \NVirus identified *(.*)$\N
        malware         = *
        log_message     = This message contains malware (avg:$malware_name)

Let me know if this works for you — I hacked this up quite quickly, but it seems to do its job…

Categories
Windows

How Apple’s Bonjour service may break your net config…

Suddenly my brand-new, only a couple of days old Windows 7 installation had an odd problem: After a system boot or restart, networking would be broken in a way that hosts in the Internet could not be reached.

I investigated the problem and noticed that my Ethernet adapter had two default gateways assigned, while the first was 0.0.0.0:

C:\Users\rabe>ipconfig /all
[...]
Ethernet adapter Local Area Connection:
[...]
   Default Gateway . . . . . . . . . : 0.0.0.0
                                       192.168.2.1

I googled for this problem and found some hint that pointed toward’s Apple’s Bonjour service. Supposedly it sometimes starts up before networking is fully up, and in consequence assigns the invalid default gateway. The advice given there to solve the problem was to completely disable this service.

While I currently don’t need this service, I didn’t want to use this “brutal” approach, so what I did was switch the service to start up as Automatic (Delayed Start) as opposed to Automatic (which causes the service to start as early as possible).

And this indeed did the trick — I don’t have these annoying networking problems anymore. 🙂

Update: To correct the name in the “Services” application which will often be Id_String2.6844F930_1628_4223_B5CC_5BB94B879762 you can use a command sequence as follows (your path to mDNSResponder.exe may vary):

"C:\Program Files\Bonjour\mDNSResponder.exe" -remove
"C:\Program Files\Bonjour\mDNSResponder.exe" -install
Categories
Mac

How to “clone” Finder windows under Mac OS X Snow Leopard…

I’m now using Mac OS X since 1.5 years, and something that I always wanted to be able to do is to quickly open another Finder window that shows the same path as another one.

Today I discovered how to do this (not exactly obvious, if you ask me!), and here’s how…

Press Cmd-N to open a new window. With the new window being active, click Cmd-Shift-G to open the “Go to the folder” prompt. Press BkSpc to clear the prefilled content. Now activate the window that you would like to “clone.” Click-drag the Folder symbol in the title bar and drag it into the “Go to the folder” prompt. Click “Go” or press Return.

Presto! You cloned your original Finder window.

If you know more hints like this, please do post them here!

Categories
Computers

Thunderbird 3.0 Upgrade: Stored Passwords “lost”

I recently installed the upgrade to Thunderbird 3.0 on our main PC. In my account, all was fine afterwards, but my wife had a very strange problem: All previously stored passwords seemed lost. TB 3.0 asked for the passwords of all accounts that she had, both IMAP and NNTP. When I started TB 2.0 (which I reinstalled for investigating this issue), all was fine again — apart from the password for the NNTP account, which was incorrect or missing, so I entered it again.

I noticed that now that TB 3.0 was installed, there was a file signons.sqlite in the Profiles folder in addition to the well-known signons3.txt file. I figured that the SQLite file was probably the new password store, which was migrated from the pre-3.0 password store in the TXT file. I further figured that during the migration something probably went wrong (eventually the missing/incorrect/corrupt NNTP password?), so I removed the SQLite file and started TB 3.0 up again. Upon starting up, it recreated the SQLite file, and this time all worked well.

So, if you folks have a similar problem, try the approach I described here. It should not be risky at all, since the TXT will always be the “master” file when migrating from 2.0 to 3.0, so removing the SQLite file will have it re-created again upon next startup.

Categories
Computers Mac WTF

Snow Leopard’s “Disk Utility” can’t create encrypted image

Two months or so I ordered the Snow Leopard DVD for my Macbook Pro. Finally I had the time to perform the upgrade from Leopard. Before actually doing so, I tried to create a disk image of my current Leopard installation. So I booted the Snow Leopard DVD and ran “Disk Utility” from it. Because the target of that disk image was an external hard drive shared by my team, I wanted to create an encrypted image.

Regardless of whether I selected “128-Bit AES” or “256-Bit AES” as an encryption method, I immediately received the following error message on screen:

Unable to create "Macintosh HD.dmg" (Cannot allocate memory)

What is this trying to tell me? No space on hard drive? Impossible, since the external hard drive is a 2 TB empty drive. Moreover, “memory” usually refers to “main memory”, or “RAM.” So is Disk Utility actually trying to read the whole 200 GB hard drive into the RAM, then encrypting it, and then creating the disk image from it?! I can’t believe that anyone would be that stupid to design a disk imaging program like this…

I finally changed the image format to “Compressed”, and presto, it worked!

Anyway, why, oh why is it so hard to generate “user friendly” error messages? And why does this happen under Mac OS X of all operating systems, supposedly being the “user friendliest” OS in the universe?

This is not the first time I receive such useless error messages in OS X. Hey Apple, care to finally make your homework???