2006 Nov 05 - Sun
Definitive Dictionary on HTML and CSS coding:
Index DOT Html
[/Personal/SoftwareDevelopment/HTML]
permanent link
What Is it Like
Well, Bermuda, that is. But I should take one step back yet. I had to go back to my paperwork to see just
how long I've been here in Bermuda. Ah, yes. My rent contract came up for renewal back this June. So ... a
few more calculations, and it turns out I was here off and on from the beginning of 2004, and settled in full
time during June 2004. Almost three years. Three very fast years.
I must say a bit too much work. Although I have tried to fit in some International One Design (IOD) sailing
in while I can. My up-coming new years resolution will be to last a full season without getting socked in with
work.
I lived in St. Thomas, USVI for a year and half before arriving here. Now if I could bring their winter
time weather to Bermuda, I think I would be in Nirvana.
In Bermuada, I'm living on North Shore road. It provides a great view of the ocean on every ride into work.
When ever I happen to leave the island and come back, I take the taxi ride back from the airport. I have to
pinch myself every time. There is nothing like coming back home to paradise. No four line highways here.
Not a one.
And by living on North Shore, I have two or three routes home, and none of them have traffic congestion.
Well, yes, I did do that on purpose. Fortunately, I was here for a while to get an idea of where good places
were, and what to look out for when renting a place.
Anyway, enough for now. More later.
[/Personal/Bermuda/Personal]
permanent link
Master Shaper Installation
Introduction
Mastershaper is a composite tool designed to filter and control ip traffic of all
types. It is composed of five primary tools: a specially compiled 2.6
kernel, l7-filter, iptables, ipp2p, and mastershaper. This document walks through the
integration and configuration of each of these tools.
The installation is based upon
the Debian Etch 2 installation with Apache 2.
Kernel Preparation
Make sure you've got the latest and most appropriate kernel for your machine, by
using the appropriate base build documentation.
Install tools:
apt-get install yaird
apt-get install kernel-package libncurses5-dev fakeroot wget bzip2
cd /usr/src
tar -xjf linux-source-2.6.15.tar.bz2
cd linux-source-2.6.15
make menuconfig
general: append version info
In the menu, load the alternate configuration file from /boot/config-2.6.15-1-686, or which ever is
appropriate for the kernel you have loaded. Make any appropriate adjustments to the
configuration. Exit the menu. By leaving all defaults as they were, you can
rebuld the kernel in its default configuration. We'll then make further
modifications.
make-kpkg clean fakeroot make-kpkg --initrd --revision=mastershaper.1.0 kernel_image
cd ..
dpkg -i linux-image-2.6.15_mastershaper.1.0_i386.deb
reboot
When the image comes back up (you may need to manully select the
new image, as well as update /boot/grup.menu.lst), run 'uname -a' to check the build date to
confirm it is your new basic rebuild. Obtain and install the l7-filter and
related patches:
cd /usr/src
wget http://internap.dl.sourceforge.net/sourceforge/l7-filter/netfilter-layer7-v2.2.tar.gz
tar -zxvf netfilter-layer7-v2.2.tar.gz
cd linux-source-2.6.15
patch -p1 < ../netfilter-layer7-v2.2/kernel-2.6.13-2.6.16-layer7-2.2.patch
After patching the kernel, install the patterns:
cd /usr/src
wget http://internap.dl.sourceforge.net/sourceforge/l7-filter/l7-protocols-2006-06-03.tar.gz
tar -zxvf l7-protocols-2006-06-03.tar.gz cd l7-protocols-2006-06-03
make install
Some changes are required to iptables before compiling the kernel.
apt-get remove iptables
cd /usr/src
ncftp ftp://ftp.netfilter.org/
cd pub/iptables
bin
get iptables-1.3.5.tar.bz2
exit
bzip2 -d iptables-1.3.5.tar.bz2
tar -xvf iptables-1.3.5.tar
cd iptables-1.3.5
patch -p1 < ../netfilter-layer7-v2.2/iptables-layer7-2.2.patch
chmod +x extensions/.layer7-test
cd /usr/src
ncftp ftp://ftp.netfilter.org/
cd pub/patch-o-matic-ng/snapshot
bin
get patch-o-matic-ng-20060626.tar.bz2
exit
tar -xjvf patch-o-matic-ng-20040621.tar.bz2
cd patch-o-matic-ng-20060626
export KERNEL_DIR=/usr/src/linux-source-2.6.15
export IPTABLES_DIR=/usr/src/iptables-1.3.5
./runme extra
** add the 'time', 'ipp2p', 'route' modules
cd ../iptables-1.3.5
make KERNEL_DIR=/usr/src/linux-source-2.6.15
make install KERNEL_DIR=/usr/src/linux-source-2.6.15
Build the kernel again:
fakeroot make-kpkg --initrd --revision=mastershaper.1.1 kernel_image
Install MasterShaper
MasterShaper is the web site front end for controlling and monitoring the kernel
tools just installed.
apt-get install mysql-server
Create the database and assign privileges:
mysql
create database shaper;
grant all privileges on shaper.* to 'shaper'@'localhost' identified by 'shaper' with grant option;
exit
Download and install MasterShaper:
cd /usr/src
wget http://www.mastershaper.org/mastershaper_0.44.tar.bz2
tar -xjvf mastershaper_0.44.tar.bz2
cd MasterShaper-0.44
mkdir /var/www/shaper
cp -R htdocs/* /var/www/shaper/
chown -R www-data.www-data /var/www/shaper
cd /usr/src
Install some libraries:
apt-get install iproute
apt-get install libphp-jpgraph
apt-get install php-pear
apt-get install sudo
apt-get install php-db
apt-get install php4-mysql
apt-get install libphp-phplayersmenu
pear install DB Net_IPv4
cd /var/www/shaper
ln -s /usr/share/php/libphp-phplayersmenu phplayersmenu
ln -s /usr/share/jpgraph jpgraph
Usage Notes
To get help on the IPP2P IPTables plugin:
iptables -m ipp2p --help
To run the GUI:
http://localhost/shaper
On the first configuration screen, iptables should be set to
'/usr/local/sbin/iptables'.
MasterShaper documentation can be found
at:
http://www.mastershaper.org/index.php/Main_Page
[/OpenSource/Debian/MasterShaper]
permanent link
Configuring Wireless on Cisco 871W with SDM
This was not a pleasant experience. No wonder I like CLI over GUI interfaces. With a
command line, I get feedback as to what I'm doing wrong. With Cisco's SDM, it has some
rudimentary user-interface checks before performing a post. On the other end, if you
haven't put something into the UI correctly, at least for the wireless config pages,
you don't even get a 'hey dummy' message, it just plain ignores you. No feedback, no hints,
no nothing.
I simply wanted to get my wireless bit bridged to the vlan bit. The first step is to
select the setting in SDM GUI to bridge the wireless with the wired. This will create the
normal BVI interface. No problem there. After that, you go into the wireless configuration
web pages. I simply wanted to get a WPA-PSK (Pre-Shared Key) into the unit. There is no
obvious way to accomplish that task.
I ended up taking a configuration from a 1230 wireless access point, massaged it a bit,
and dropped it into the 871. Which yields another beef: there are variations in how
wireless is configured in a 1230 vs the 871. In the 871, the ssid and authentication stuff
is in the 'interface Dot11Radio0' section. In the 1230, it is outside. Cutting and pasting
therefore is not quite so simple.
So, after hours of diddling with the GUI, I did the following in a few minutes with the
CLI:
interface Dot11Radio0
no ip address
!
encryption vlan 1 mode ciphers tkip
!
ssid my ssid
vlan 1
authentication open
authentication key-management wpa
guest-mode
wpa-psk ascii mywpapsk
!
speed basic-1.0 basic-2.0 basic-5.5 basic-6.0 basic-9.0 basic-11.0 basic-12.0 basic-18.0 basic-24.0 basic-36.0 basic-48.0 basic-54.0
station-role root
l2-filter bridge-group-acl
no cdp enable
!
interface Dot11Radio0.1
encapsulation dot1Q 1 native
no cdp enable
bridge-group 1
bridge-group 1 subscriber-loop-control
bridge-group 1 spanning-disabled
bridge-group 1 port-protected
bridge-group 1 block-unknown-source
no bridge-group 1 source-learning
no bridge-group 1 unicast-flooding
!
interface Vlan1
description Wired Network
no ip address
ip virtual-reassembly
ip route-cache flow
load-interval 30
fair-queue
bridge-group 1
!
interface BVI1
description $ES_LAN$
ip address 10.10.10.254 255.255.255.0
ip nat inside
ip virtual-reassembly
ip tcp adjust-mss 1452
[/Cisco]
permanent link
Phone Serial Numbers
Cisco doesn't store their phone serial numbers anywhere. So, for companies wishing to obtain SmartNet for
their installed base of telephones, there aren't too many ready ways of obtaining those serial numbers, from a
first time perspective.
To help one customer out of a bind, I did a couple of very quick and dirty scripts to scan the network for
phone devices. I know it works for 7912's, 7940's, 7960's, 7970's and ATA adaptors.
I didn't realize until later that instead of scanning the human readable pages, I could have scanned the xml
pages for the information. Oh, well. That will be for the next version.
To operate, you'll need a Perl interpreter and a couple of libraries off CPAN. Then edit
findphones.pl and
supply the ip address ranges you'd like to scan. Run the script and send STDOUT to a file.
Then run the file through
filterphone.pl to get a model
number and serial number list.
Cisco's CP-7935 and CP-7936 conference phone serial numbers are simply their mac addresses, which is easy to
pull out of Callmanager.
[/Cisco]
permanent link
Flavour Bugs
Well they aren't flavour bugs per-se. They are more like misunderstandings. Well, not
that either. The word will come to me. My issue is that I have the two flavours: .blog
and .article. Each with their own foot and head pieces. Now I have to figure out how to
meld the two into one so that I don't have to update code in two different places when ever
I make adjustments to the web site.
Looks like 'ln -s foot.blog foot.article' fixes that little conundrum.
[/OpenSource/blosxom]
permanent link
Blosxom WriteBacks
So far, Blosxom has behaved quite nicely. It is amazing how such a compact application can effectively do so much.
One addition I've wanted to add in order to make this site a two way street is WriteBacks. There were a few items
in the Blosxom Plugin Registry, but have been a bit uncertain as to the reliability of the code, as it really hasn't been
updated in quite some time. I finally did come across a link to
Kevin Scaldeferri's Blog, from the
Blosxom User Group Blog. He has a plugin, with recent
updates which provides WriteGack capability.
During the installation process, there are a number of things needing doing. One is that you need the flavours from
Rael's Original WriteBack Plugin. Don't install the
plugin, just the flavour files. Then install Kevin's plugin. There are some configurations in the file you'll need
to perform.
The trick with this is that you don't want all the comment submissions to happen on your main blog page, which will happen if
you put the various bits in your default story.flavour. Instead, create two flavours, I call the default flavour 'blog', and the
secondary flavour 'article'. In 'story.blog', along with the standard permanent link, you place the writeback count.
In story.article, you put the form to be posted. This draws the submission form only when viewing a single article. Use the
supplied foot.writeback for inspiration. Also, in story.article, you place the code to view the writebacks. Use story.writeback for inspiration.
Be sure to make the various variable updates in the writeback plugin, and you should be good to go, but for some formatting
and alignment issues you may want to tune.
[/OpenSource/blosxom]
permanent link
Blosxom Categories
I installed Todd Larason's Categories Plugin, and I'd say it is another very easy
winner. I used the 'breadcrumbs' version rather than the heavily indented and space
consuming 'categories' version.
With this, I've reached my goal of a functioning Blog with navigation, advertising, and
writebacks. For the targetback thing I havn't quite figured out how it works or what it
does. Perhaps some one could 'writeback' and let me know how it works, and what I should do
with it.
[/OpenSource/blosxom]
permanent link
Blosxom Calendar
I installed
Todd Larason's Calendar, changed a value in the config file to turn off caching, put two lines of code in my story.flavour
file, and presto, calendars. I wish all software were this easy.
I see he is using MovableType now. I've flirted with trying that a couple of times. I haven't quite had to
go quite
that far yet. We'll see what happens with my next project: showing a list of categories. If I can get that going, then I think
I've covered most of the basic features of a Blog site, and will want for little else. Famous last words.
[/OpenSource/blosxom]
permanent link
HTML Escape Codes
- For the < type <
- For the > type >
- For the © type ©
- For the & type &
- For the " type "
[/Personal/SoftwareDevelopment/HTML]
permanent link
|