martybugs.net SmoothwalL Express Info
 navigation
. MartyBugs home
. Smoothwall home
 
 Smoothwall info
. my box
. connect speed display
. red IP address display
. bytes in/out
. VNC over SSH
. time sync
. ad zapping
. ip accounting on 0.9.9 / 1.0
. ip accounting on 2.0
. status LEDs
. adding web users
. iptables config
. internal PPTP VPN
. RRDTool traffic graphs
. password reset
. proxy log analysis
. RRDTool memory graphs
. Squid config
. adding shell users
. Smoothwall links
 
 modem config
. Billion 7402L adsl router
. DSL-300G adsl modem
. DSL-300+ adsl modem
 
 site search
Custom Search
 
Status LEDs

[This modification has been verified to work with Smoothwall GPL 1.0 and Smoothwall Express 2.0.
 I've also been informed that it works with IPCop.]


Overview
I use four LEDs to show the status and network activity on my Smoothwall box.

I have the LEDs taped underneath my monitor stand, so I can easily see what my Smoothwall box is doing.


the LEDs mounted on my monitor stand

The green LED indicates my Smoothwall box has power, the red LED indicates that the red interface is up, the first orange LED indicates Smoothwall is transmitting data over the red interface, and the last LED indicates Smoothwall is receiving data over the red interface.

I can instantly see if my Smoothwall is connected to the internet, and see if it's either receiving or transmitting data.

Hardware
The LEDs are connected to the keyboard controller from an old keyboard that I disassembled.
I replaced the Caps Lock, Scroll Lock and Num Lock LEDs with two orange and one red LED, added an additional LED connected to the PS2 +5v line (with an appropriate resistor), and soldered them onto a short length of vero-board, connected to the keyboard controller PCB via a short length of ribbon cable.

the keyboard controller and LEDs

For more details on the hardware, refer to my Server Status with Keyboard LEDs page.

Software:
The LEDs are driven by a modified version of ifled 0.6 (by Mattias Wadman). ifled allows you to use the keyboard LEDs to indicate network activity.

I've added some functionality to allow it to display the status of Smoothwall's red interface, and have called it sifled (for "Smoothwall InterfaceLED").

You can download the sifled executable and the source code from the links in the "Requirements" section immediately below (sifled Changelog is available here).

Requirements:
You'll need:
  • A Smoothwall GPL 1.0 or Express 2.0 installation (obviously...).
  • An SCP client (such as WinSCP, or SSH Secure File Transfer Client, part of SSH Secure Shell) for copying files onto your Smoothwall box.
  • A way of getting a command-line prompt on your Smoothwall box (either by logging directly onto your Smoothwall box, using a SSH client such as PuTTY or SSH Secure Shell, or via the Smoothwall web interface).
  • The sifled 0.5 executable (source code also available; last updated September 2006)
  • A keyboard (you can disassemble the keyboard as I have done, or you can leave it in one piece).
Installation Instruction:
Ensure you have SSH enabled on your Smoothwall (it's configured on the "remote access" page. This is required for copying files to your Smoothwall via SCP, and for logging into your Smoothwall with SSH.

Download and copy the sifled executable into /usr/local/bin/ and chmod it from a command prompt:

chmod 755 /usr/local/bin/sifled

Edit /etc/inittab and insert this lines at the end:

sif1:3:once:/usr/local/bin/sifled console eth1 -c ltr -f

Note that you'll have to adjust the eth1 as appropriate - it needs to be the name of your red interface (ie, ppp0 for dialup and pppoe, etc).
If you're not sure of the name of your red interface, run the following from a command prompt on your Smoothwall, and it'll display the name of your red interface:

cat /var/smoothwall/red/iface

You can also specify different LED behaviour if you wish, by specifying different parameters after the -c flag.
Run sifled from a command line with no parameters to view usage information, or refer to the README file included with the source code for details.

(Note that in 2b5 and previous versions of Smoothwall, the sifled start commands could be appended to /etc/rc.d/rc.sysinit, but this no longer works in 2b6, due to some changes in the way runlevels are handled. As a result, in 2b6 and later, you'll need to use the instructions above, and start sifled from /etc/inittab.)

When you next reboot your Smoothwall box, sifled will automatically be started. To start it without having to reboot, run the sifled statement from a command line:

/usr/local/bin/sifled console eth1 -c ltr -f

As before, adjust the eth1 as appropriate.

For more information on using sifled, just run it from the command line with no parameters, and usage information will be displayed.

If the command line specified above is used, sifled will use the Num Lock LED to indicate the status of your red interface, the Caps Lock LED to indicate when data is being transmitted through your red interface, and the Scroll Lock LED to indicate when data is being received through your red interface.

If desired, you can configure sifled to show traffic on multiple interfaces - refer to the README file included with the source code.

Note that the status of the red interface is only valid for dial-up connections and PPPoE connections. If your red interface is an ethernet interface configured to use DHCP, then sifled will always show it as active.
When I was using a DLink ADSL modem in half-bridge mode, the modem was handling the PPPoE, and Smoothwall's red interface was just configured for DHCP. As a result, the red interface status as displayed by sifled was always active.
After switching to a Billion 7402L in bridge mode, I now have Smoothwall handling the PPPoE, and sifled will now correctly indicate if the red interface is up or down.

References:
ifled - InterfaceLED
Server Status with Keyboard LEDs



last updated 30 Mar 2007
 
.