Showing posts with label opensource. Show all posts
Showing posts with label opensource. Show all posts

Thursday, May 22, 2008

inadyn, opendns, and Ubuntu

I have been using DNS services from OpenDNS.org for a little while now, and I am very happy with some of the features that they provide such as URL shortcuts and finely grained internet filtering. However, in order to use the features, I have to keep my dynamic IP address up to date with their DNS-O-Matic service. Their list of clients includes inadyn, which is available through Ubuntu but doesn't include DNS-O-Matics ssl extensions and so I compiled my own version and installed it.

Here are the steps I followed:

  1. Download modified inadyn source code from OpenDNS -- wget http://www.opendns.com/support/ddns_files/inadyn.source.v1.99.zip
  2. Unzip the source code -- unzip inadyn.source.v1.99.zip
  3. sudo apt-get build-dep inadyn
  4. sudo apt-get install libcurl4-openssl-dev
  5. cd inadyn.source.v1.99
  6. make
  7. sudo cp -p bin/linux/inadyn /usr/local/sbin/.
  8. Create a script named inadyn in /etc/init.d so that it will launch automatically on startup.
    #! /bin/sh

    ### BEGIN INIT INFO
    # Provides: inadyn
    # Required-Start: $network
    # Required-Stop: $syslog
    # Should-Start: $named $syslog
    # Should-Stop: $syslog $network
    # Default-Start: 2 3 4 5
    # Default-Stop: 0 1 6
    # Short-Description: Dynamic IP Adress updater
    # Description: inadyn is a program that updates services such as
    # dyndns.org and dnsomatic.com when the host's external
    # external IP address changes.
    ### END INIT INFO

    set -e

    # /etc/init.d/inadyn: start and stop the inadyn daemon

    DAEMON=/usr/local/sbin/inadyn
    INADYN_ENABLE=true
    INADYN_OPTS=''
    INADYN_CONFIG_FILE=/etc/inadyn.conf

    test -x $DAEMON || exit 0

    . /lib/lsb/init-functions
    . /etc/default/rcS

    export PATH="${PATH:+$PATH:}/usr/sbin:/sbin:/usr/local/sbin"

    case "$1" in
    start)
    if "$INADYN_ENABLE"; then
    log_daemon_msg "Starting inadyn daemon" "inadyn"
    if [ ! -s "$INADYN_CONFIG_FILE" ]; then
    log_failure_msg "missing or empty config file $INADYN_CONFIG_FILE"
    log_end_msg 1
    exit 1
    fi
    if start-stop-daemon --start --quiet \
    --pidfile /var/run/inadyn.pid --make-pidfile\
    --exec $DAEMON
    then
    rc=0
    else
    rc=1
    fi
    if [ $rc -eq 0 ]; then
    log_end_msg 0
    else
    log_end_msg 1
    fi
    else
    if [ -s "$INADYN_CONFIG_FILE" ]; then
    [ "$VERBOSE" != no ] && log_warning_msg "inadyn daemon not enabled in /etc/init.d/inadyn, not starting..."
    fi
    fi
    ;;
    stop)
    log_daemon_msg "Stopping inadyn daemon" "inadyn"
    start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
    log_end_msg $?
    ;;
    restart)
    set +e
    if $INADYN_ENABLE; then
    log_daemon_msg "Restarting inadyn daemon" "inadyn"
    start-stop-daemon --stop --quiet --oknodo --exec $DAEMON || true
    sleep 1
    if start-stop-daemon --start --quiet \
    --pidfile /var/run/inadyn.pid --make-pidfile \
    --exec $DAEMON
    then
    rc=0
    else
    rc=1
    fi
    if [ $rc -eq 0 ]; then
    log_end_msg 0
    else
    log_end_msg 1
    fi
    else
    [ "$VERBOSE" != no ] && log_warning_msg "inadyn daemon not enabled in /etc/default/inadyn, not starting..."
    fi
    ;;

    *)
    echo "Usage: /etc/init.d/inadyn {start|stop|restart}"
    exit 1
    esac

    exit 0
  9. sudo update-rc.d -f inadyn defaults
  10. Create an inadyn.conf file in /etc
    background
    syslog

    update_period_sec 600 # Check for a new IP every 600 seconds
    secure

    # Enter your DynDNS username and password here
    username <USERNAME GOES HERE>
    password <PASSWORD GOES HERE>

    # What kind of host is being updated? Choices are dyndns@dyndns.org, statdns@dyndns.org, custom@dyndns.org
    dyndns_server_name updates.dnsomatic.com
    dyndns_server_url /nic/update?
    alias <DNS-O-Matic SERVICE 1 GOES HERE>
    alias <DNS-O-Matic SERVICE 2 GOES HERE>

  11. /etc/init.d/inadyn start

  12. all done inadyn is now installed and will keep DNS-o-Matic apprised of you IP address.

Friday, December 21, 2007

MythFrontend over VNC

Sometimes I like to access my MythTV box over VNC. However, MythFrontend's default settings use OpenGL which doesn't play nicely with VNC. I found adding a parameter to the mythfrontend command forces it to use the QT painter instead of OpenGL which makes everything work perfectly (except for video of course). Since my MythTV box doesn't normally have a keyboard attached to it, and I find that using the remote to make changes in the setup can sometimes be tedious, so I use this trick to make things a little bit easier. Here's the command:

mythfrontend -O ThemePainter=qt

Friday, November 30, 2007

Circumventing restrictive firewalls using SSH for fun and profit

I occasionally need to find a way to route network traffic from my machine through another machine in order to circumvent a draconian firewall or a network resource on a private machine. I order to get started you'll need a shell account on the remote computer. This could be as simple as signing up for a free ssh account from a site like those listed here. You could also setup an SSH server like copSSH on your Windows machine if you don't have access to a Linux machine somewhere and don't want to be restricted by the restrictions placed on most free SSH accounts.

Once you have ssh access to the remote machine then you can fire up Putty. Enter in the hostname in the hostname field and then in the Connection->SSH->Tunnels configuration panel put 8080 in the "Source Port" box, select the Dynamic option, and click "Add". Click "Open" and then login to the remote host like normal.
If you happen to be on a machine that has openSSH installed, then you can just type "ssh -D <remote hostname>" to acheive the same effect.

After the connection has been established you should be able to set any of your internet based programs that can use a SOCKS proxy to use the address "localhost:8080" as a proxy server. All of your data will then be automagically rerouted through an encrypted connection between the two computers and appear to be originating from the remote host instead of your local machine. Some of the programs that work well with this method are Pidgin, Firefox, and bit torrent clients like Azureus.

Thursday, November 29, 2007

Pidgin Portable updated to version 2.3

I have packaged a version of PidginPortable using Pidgin 2.3 and the method that I described earlier for Pidgin 2.2.1. You can download the file from here:

http://www.mediafire.com/?8mmnmtxs9jc

edit:Pidgin did a quick update to version 2.3.1. Please use this new download link to get the latest version.

http://www.mediafire.com/?7g1p29yfyjx


UPDATE: PortableApps.com has released an official version of Pidgin 2.4 so I will no longer be updating my version. Thanks to all of you who used it while it was needed.

Tuesday, October 09, 2007

Upgrading PidginPortable to version 2.2.1

If you don't want to read the whole post, here is a link to the download:
PidginPortable 2.2.1

I use Pidgin for most of my IM needs, and in order to keep my logs all in one place, I use the PortableApps.com version of PidginPortable and keep it on my USB Drive.

However, the version of PidginPortable on PortableApps.com hasn't been updated since mid August and is still stuck at version 2.1.1 while the latest official release is 2.2.1 which includes several important new features (such as MySpaceIM protocol), bug fixes, and even an important security fix. I finally got annoyed at being stuck with version 2.1.1 (especially since every time I started PidginPortable up I got a reminder message saying that there was a newer version available), and I decided to see if there was an easy way to upgrade the PortableApps distribution to 2.2.1.

It actually turned out to be really easy. All you need to do to upgrade is to replace the files in your "PidginPortable\App\Pidgin" folder with the same files from the current release of Pidgin. Unfortunately there isn't a binary only distribution on the Pidgin SourceForge page, so I installed Pidgin on my computer using the packaged installer and copied the files out of the installation directory. I also used upx to compress the pidgin.exe in order to save a little bit of space.

In order to make it easier for others who may be looking for the same thing, I have posted my updated version of PidginPortable on mediafire.com. Here is a link:

http://www.mediafire.com/?4q1dovsuto5

edit: I have updated to version 2.3 please use this new download link

http://www.mediafire.com/?8mmnmtxs9jc

Monday, September 24, 2007

Mozy Online Backup: Simple, Automatic, Secure

I installed the Mozy backup client a while ago and never thought twice about it silently backing up my files. Fast forward to last week when I tried installing the Enigmail extension for Thunderbird. I originally installed Enigmail so that I could exchange encrypted emails with a Client who insisted on using GPG instead of S/MIME.

The Enigmail installation monkeyed around with lots of my Thunderbird settings including adding an extra link to download IMAP messages from the server that I had to click everytime that I wanted to read a message. After messing around with things for a few minutes, I decided to give up on Enigmail and ditch it in favor of FireGPG. However, even after uninstalling Enigmail the problems persisted. I probably could have figured out how to get everything back to normal, but my Thunderbird was almost unusable as it was and I just wanted my email program back to normal.

For a moment I pondered with dread what it would take to reinstall Thunderbird and redo all of the customization I had done to personalize the app over the last three years, when suddenly I realized that this was a perfect time to try out a restore from Mozy. Fortunately I had included my Thunderbird directory in my Mozy backup set, so I did a quick restore of my prefs.js file, and when I restarted Thunderbird, lo and behold, everything was back to normal. Here are the steps that I followed in case someone else needs to do the same thing.

  1. I shutdown Thunderbird so that it wasn't running.
  2. I opened the Mozy Virtual Drive in My Computer.
  3. I navigated to the Mozilla Thunderbird profile directory. (C:\Documents and Settings\\Application Data\Thunderbird\Profiles\)
  4. I right clicked on the profile folder and chose "Change Time..." to select yesterday's backup.
  5. I right clicked on the "prefs.js" file and chose "Restore" to restore the old file over the new file.
  6. I restarted Thunderbird and everything was back the way it should be.
Thanks a lot mozy! You saved my day.

Here is what some other people are saying about Mozy
Walter S. Mossberg, The Wall Street Journal
Larry Armstrong, BusinessWeek

Wednesday, November 08, 2006

DivX to iPod the Open Source way

So I went looking today for some info on how to convert DivX shows to an iPod compatible H.264 format. There are lots of commercial solutions out there, but I prefer to find free software. I looked for a long while and finally found Mediacoder. Here are instruction on how to convert your divx files for your video ipod in 6 easy steps.

1. Go to http://mediacoder.sourceforge.net/ and download Mediacoder
2. Install Mediacoder and run it.
3. Select Add File and add the divx file
4. Select devices button
5. Select extension->digital media player
6. Press "start" to the left of the ipod.

Shazaaam! divx to ipod. in six easy steps.

 

Blogger Template by Blogcrowds