Network Tracing from the Fritz!Box

My internet provider has provided me a Fritz!Box Fon 3970, which is a neat all-in-one modem / router / voip and DECT connectivity box. Although this box is running Linux and pretty extendible with Freetz, in some area’s it is a pretty closed black (erm.. red) box and sometimes it is hard to debug problems.

Today, while debugging issues with my DHCP server, I found out that the standard Fritz!Box firmware includes a handy network tracer. To trace network traffic (all or just on a specific interface), go to http://fritz.box/capture.lua and specify which interface to start the trace on.

The output will be provided through a download that starts immediately. The resulting file can be opened using Wireshark for analysis.

I didn’t solve my DHCP problem yet (the DHCP server is still only giving WLAN clients and IP address and not to wired clients), but that’s something I will tackle over the weekend now that I can obtain a decent network trace from the box.

Automatically lock your Mac when you step out

Of course, being a mac user at home, after yesterday’s post on locking a windows machine I have been looking for a similar solution to automatically lock my mac when I step out. A similar setup as with btprox for Windows can be established easily by combining the power of an open-source tool called Proximity with a little AppleScript.

Proximity is a more generic solution that allows one to run an AppleScript when a Bluetooth device gets in or out of range. The generic solution was already described on Lifehacker and Macworld Hints. However, they both have a too generic solution where just getting in range with the paired device would unlock the computer, which is not exactly what I wanted. I use the following AppleScript instead, which only switches off iTunes if it is running (and does not start it when it is not) and locks the screen:

    if application id "com.apple.iTunes" is running then
        tell application id "com.apple.iTunes" to pauze
    end if

    activate application id "com.apple.ScreenSaver.Engine"

My Default settings for the screen saver to always require a password after 1 minute suffice for me and render the setup I need on my Mac OS X Lion machines.

Automatically lock Windows when you step out

For my work I need to use a laptop running MS Windows 7 Enterprise in a domain. To ensure that all laptops lock automatically, my employer’s IT department has deployed a domain policy to activate the screen saver after 10 minutes idleness and lock the screen. These settings are enforced through adomain policy and cannot be modified by the user, which means that I cannot have the screen lock sooner either so I have been looking for a way to work around this.

Some time ago I discovered BtProx, an open-source Bluetooth Proximity Lock Utility for Windows and I am quite happy with how it works. This utility allows one to lock the screen when a bluetooth device gets out of range. I have paired this app with my cell phone so now my laptop’s screen locks 1 minute after I step out from my desk.

So far, the only drawback I noticed is that I need to activate it manually after logging in (you cannot set it up an forget about it). Besides that for me this is a perfect solution to lock my screen when I need it to despite the enforced domain policy.

Enabling TFTP on Mac OS X Lion

While migrating my linux-based server to Mac OS X Lion Server, I noticed it did not have a TFTP server enabled by default. A little googling pointed me to a blog post of The Weezey Geek, who outlined that everything is there, it’s just disabled.

 I enabled the TFTP server as follows (which is slightly different from the post referred to below):

  1. edit /System/Library/LaunchDaemons/tftp.plist as root (sudo vi /System/Library/LaunchDaemons/tftp.plist)
  2. Change
    <dict>
            <key>Disabled</key>
            <true/>

    into

    <dict>
            <key>Disabled</key>
            <false/>
  3.  Next load the configuration with sudo launchctl load /System/Library/LaunchDaemons/tftp.plist

 Which makes the change permanent and starts the TFTP daemon.

by default TFTPD uses /private/tftpboot as it’s root directory. To change this, modify the following fragment in /System/Library/LaunchDaemons/tftp.plist:

        <array>
                <string>/usr/libexec/tftpd</string>
                <string>-s</string>
                <string>/private/tftpboot</string>
        </array>

To allow TFTP uploads, make sure that the directory to be uploaded to (be wise and make this a subdirectory of your TFTP root directory) is writable to all users.