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
 
Display Bytes In/Out

[This modification has been verified to work with Smoothwall GPL 1.0 and Smoothwall Express 2.0.]

This page details how to get your Smoothwall GPL installation to display the data throughput for current connection with the red interface.
Note that this modificaton will only work if your red interface is a dialup modem (ie, using ppp) or your Smoothwall is using PPPoE (and I think it'll work for PPPoA).

If you want your Smoothwall to display the dialup connect speed, the red IP address, and bytes in/out, have a look at my Dialup Info Display page.

Screen Shot:
Here's a screen shot of my Smoothwall GUI, showing the bytes in/out for my red interface.



Requirements:
You'll need:
  • a Smoothwall GPL 1.0 or Express 2.0 installation (obviously...).
  • a dialup internet connection (this modification only works for dialup users).
  • 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).
  • an SCP client (such as WinSCP, or SSH Secure File Transfer Client, part of SSH Secure Shell) for copying files onto your Smoothwall box.
  • the pppstats binary (only required for Smoothwall Express 2.0 - this is a Red Hat 9 binary)
Installation Instructions:
Ensure you have SSH enabled on your Smoothwall (it's configured on the "remote access" page. This is required for logging into your Smoothwall with SSH and SCP.

If using Smoothwall Express 2.0, you'll need to download the pppstats binary, SCP it into the /usr/sbin/ directory, and make it executable by running the following from a command prompt:

chmod 755 /usr/sbin/pppstats

Edit /home/httpd/cgi-bin/index.cgi and immediately after the line containing

print $connstate;

insert the following

print "</B>\n";
print "<center><font size='2'><br>\n";

# get PPP stats
@stats = split(' ', `pppstats | tail -n 1`);

# check if we have stats
if ($stats[0] != 0)
{
	$bytesin = commify(int($stats[0]/1024));
	$bytesout = commify(int($stats[6]/1024));
	print "$bytesin kb in; $bytesout kb out";
}
print "</font></center>";

# function to format numbers with commas at thousand separators
sub commify
{
	(my $a = shift) =~ s/\G(\d{1,3})(?=(?:\d\d\d)+(?:\.|$))/$1,/g;
	return $a;
}

That should be all that's required - just point your web browser at your smoothie, and you should see the additional info on the index.cgi page.

Note that some of the Smoothwall fixes overwrite the index.cgi with a newer version, so if you install a new fix, it may overwrite your changes, so always keep a backup copy of your index.cgi before patching your Smoothie, so you can reapply the changes to the new index.cgi.

Similarly, when doing a fresh installation of Smoothwall, only make these changes once you've fully patched the installation.



last updated 19 May 2005
 
.