Iodine (dns tunnel) on your Mac (to escape those evil firewalls)

Posted in Internet, Linux / unix, Mac OS, Software-related on July 7th, 2008 by Jan

Here’s a short how-to to get the iodine dns tunnel working on your Mac.

In this short howto, I’ll assume you’ll be using a linux server to act as your gateway to the world. I’ll also assume you’ve read the iodine documentation and setup your DNS accordingly. For my example, I’ll be using a (nonexistant) DynDNS.org static DNS entry, iodine.rulestheworld.tld. I’ll also assume that you’ll be using a public internet address of 1.2.3.4, and a private subnet of 10.0.0.1.

  1. Install the tun/tap driver for Mac OS X. Easy as doing *click* *click* done! :p
  2. Next, install iodine on your Mac. Easy as download, extract, and typing make; make install
  3. Now, install iodine on your linux box. It’s included in the package repositories of the usual suspects, for instance debian: apt-get install iodine.

    Start it (or configure it to use) with:
    iodined -P <password> <unused private IP> <dns name>
    or in our example:
    iodined -P mypass 10.0.0.1 iodine.rulestheworld.tld

    This should return the following:

    Opened dns0
    Setting IP of dns0 to 10.0.0.1
    Setting MTU of dns0 to 1024
    Opened UDP socket
    Listening to dns for domain iodine.rulestheworld.tld

  4. Configure your linux box for IP forwarding: sysctl -e net.ipv4.ip_forward=1
    (and add this to your /etc/sysctl.conf file), and configuring your firewall (iptables) for masquerading:
    iptables -t nat -A POSTROUTING -s 10.0.0.0/255.255.255.0 -o eth0 -j MASQUERADE
  5. Next, download NStun.sh, a very handy script that does all the hard work of changing the routes and so on :p

    You’ll want to change the script: change the first lines as the script reads, and lower, change the

    NS=`grep nameserver /etc/resolv.conf|head -1|awk ‘{print $2}’`

    line to read

    NS=”62.213.207.197″

Now, start NStun.sh on your Mac, and surf away! (well, slowly, but freely, atleast!)

CoRD and xrdp

Posted in Linux / unix, Mac OS, Software-related on June 29th, 2008 by Jan

I was trying to get xrdp running on my Linux box, so I could takeover the screen from the outside world. The rdp protocol is a (huge) bit more performant than VNC, which is why I wanted to use it.

Today I was trying for the 3rd time to get it to work, using CoRD as an RDP client, but I never got any image back - the client started, I saw the connection being built up, but I never got any image over. Starting rdesktop locally gave me the output I expected.

This gave me the idea of using Microsoft Remote Desktop Connection Client for Mac 2 Public Beta, to see if it might be a problem with the client… and yup, it is.

Seems CoRD 0.4.3 (the current stable) is unable to handle the output of xrdp. I now installed the 0.5 beta 1 which works without any problems.

Nokia 3109c (Symbian S40) and iSync…

Posted in Gadgets, Mac OS, Software-related on June 26th, 2008 by Jan

I got a company phone, a Nokia 3109 Classic, which is nothing less nothing more than a standard company phone. It doesn’t have all the bells and whistles I’d like to have, but it works.

What didn’t work, was iSync on this phone. Real bummer, since I was hoping to sync everything between iCal/Address Book and this phone…

Google to the rescue, and i stumbled over this blog posting by James Lloyd, detailing how to get it to work.

Summary:

  1. Download the script here
  2. Right click iSync from the Applications folder in Finder and choose “Show Package Contents”
  3. Navigate to: Contents\Plugins\ApplePhoneConduit.syncdevice\Contents\Plugins\Nokia-6131.phoneplugin and choose “Show Package Contents” again.
  4. Navigate to \Contents\Resources
  5. Replace the content of the MetaClasses.plist file with the content of the script downloaded in step 1
  6. (Re-)Setup your phone with your Mac

Done!

Copying files and dirs with tar

Posted in Linux / unix, Software-related on June 21st, 2008 by Jan

If you want to copy a bunch of files from one spot to another, but preserve links/permissions/ownership/…, it’s usually a big hassle.

With tar, you can make this hassle disappear!

Copying a directory tree and its contents to another filesystem using tar will preserve ownership, permissions, and timestamps. You can use pipe tar to another tar to prevent having to create an intermediate file to store the stuff you want to copy around.

To copy all of the files and subdirectories in the current working directory to the directory /destination, use:

tar cf - * | ( cd /destination; tar xfp -)

The first part of the command - tar - makes a tarball of all the files, and writes this to stdout. The second part of the command part will first change directory, and then extract the tarball in that location, reading from it’s stdin.

Since the cd and tar commands are contained within parentheses, their actions are performed together.

The p option in the tar command instructs tar to preserve the permission and ownership information, if possible. So if you want to move a lot of files around, it’s advisable to do so with the root user to keep all them permissions!

Mail.app tips & tricks

Posted in Mac OS, Software-related on June 4th, 2008 by Jan

I still haven’t found any mail client I really like on the Mac… I’ve been using Thunderbird now for a while, but it doesn’t really have what I want in a mail client. I guess I’m spoiled, since I’m used to using KMail at home (and I’m forced to use Lotus Notes at work - a horrible client from a usability point of view).

Recently I’ve been trying to get Mail.app to work for me. It doesn’t have quite all the bells and whistles I like, but after looking up some things online it’s getting there.

Here are some handy things for Mail.app to fix some of it’s shortcomings:

  • Adding custom headers to outgoing mails:
    Type this in Terminal.app:
    defaults write com.apple.mail UserHeaders '{"Reply-To" = "me@mydomain.tld"; }'
    Ofcourse you can replace the header with what you want, I used this to send a BCC copy to myself of every mail sent out)
  • Adding multiple mail addresses (aliases) to one mail account:
    You can type them in the “Email Address” field, separated by comma’s.
  • "Go to next unread message":
    Use something like Fastscripts with the following AppleScript (from Macscripter)

    tell application “Mail” to try
    tell message viewer 1 to set selected messages to {first message of beginning of (get selected mailboxes) whose read status is false}
    activate
    on error
    beep
    end try

  • What I still need:

    • A way to improve the threading - it’s horrible
    • An easy way to switch from mailbox to mailbox through all the ones with unread messages

    Let’s see if I find some way to fix those two… especially the threading.

    phptelemeter 1.33 released!

    Posted in Software-related, phptelemeter on June 1st, 2008 by Jan

    After nearly 8 months of no release (if you don’t count the 1.33-beta1), I’ve just released phptelemeter 1.33. This version includes the following changes:

    • Added red-hilighting support to plaintext_graphonly publisher
    • Moved the publisher parameter to a new [publisher] section, allowing for publisher-specific config settings
    • Splitted all config-related README items into a new document, Configuration
    • The machine publisher now has a configuration parameter, separator
    • Added (incomplete) edpnet_web parser, thanks to Ze0n-!
    • Added –add-option option to add configuration options without changing the config file
    • Added –no-config option to make phptelemeter not generate a config file if none is present (can be used together with –add-option)
    • Added a imgbar publisher (thanks to Nikon for the idea and concept code)
    • Fixed telemeter_web parser
    • Added more error codes to the telemeter4tools parser
    • Fixed scarlet parser

    As per usual, you can download it from SourceForge.

    Funpidgin

    Posted in Linux / unix, Software-related on May 16th, 2008 by Jan

    Thanks to a post on Frank Goosens’ blog I discovered FunPidgin! A fork of Pidgin, a multi-messenger client formerly known as Gaim.

    My biggest (and actually, only) gripe with Pidgin is that they changed the way the contact list works/behaves - you no longer have a clear view of what protocol a user is added with, so you also don’t know what protocol to pick for someone to send him/her a message/file. Since they were obviously not going to listen to their users (although it has been requested a ton of times, search their Trac), it was only a matter of time before a fork was created: Funpidgin.

    “What makes us different from the official client, is that we work for you. Unlike the Pidgin developers, we believe the user should have the final say in what goes into the program.”

    I’m definitely gonna check it out!

    Strange problems with windows 2k3…

    Posted in Windows on April 16th, 2008 by Jan

    I’m wondering if anyone out there can help me with this one…

    On one server, running Windows server 2003 R2 Enterprise x64 Edition, service pack 1, I’m encountering this problem:

    The machine often grinds to a halt, responding very slowly, and the event log is filled with:

    Application log:

    Event Type: Warning
    Event Source: PerfOS
    Event Category: None
    Event ID: 2012
    Date: 9/04/2008
    Time: 7:41:53
    User: N/A
    Computer: XXX
    Description:
    Unable to get system process information from system. The status code
    returned is in the first DWORD in the Data section.

    For more information, see Help and Support Center at
    http://go.microsoft.com/fwlink/events.asp.
    Data:
    0000: a1 00 00 c0 ¡..À

    System log:

    Event Type: Error
    Event Source: Application Popup
    Event Category: None
    Event ID: 333
    Date: 16/04/2008
    Time: 10:36:36
    User: N/A
    Computer: XXX
    Description:
    An I/O operation initiated by the Registry failed unrecoverably. The
    Registry could not read in, or write out, or flush, one of the files that
    contain the system’s image of the Registry.

    For more information, see Help and Support Center at
    http://go.microsoft.com/fwlink/events.asp.
    Data:
    0000: 00 00 00 00 01 00 6c 00 ……l.
    0008: 00 00 00 00 4d 01 00 c0 ….M..À
    0010: 00 00 00 00 4d 01 00 c0 ….M..À
    0018: 00 00 00 00 00 00 00 00 ……..
    0020: 00 00 00 00 00 00 00 00 ……..

    The only thing this machine is running is Platform Symphony, GRID computing software. This setup is identical on 4 other machines, which don’t show any problems.

    After numerous googles I still haven’t found a reason or a solution. I’ve tried:

    • reinstalling machine - problem comes back (it’s not clear before or after installing the GRID software…
    • increasing pagefile size
    • checked main drive
    • tried UHCleaner - doesn’t seem to work on 64bit
    • checked registry settings - all are identical

    Blogging from Symbian Smartphones

    Posted in Gadgets, Nokia E65, Software-related, Symbian on March 20th, 2008 by Jan

    I’ve recently discovered a new python based blogging client for Symbian S60 3rd edition based phones.

    It’s still very beta, but it works nicely!

    Check it out at http://scribe.na.nu/

    Real programmers use…

    Posted in Comics, Miscellaneous, Software-related on February 7th, 2008 by Jan

    Real programmers use...
    (Comic © http://www.xkcd.com)