Java v 1.4.2 API Reference (String) (File) (HashMap) (TreeSet) (LinkedList)
Learning the Java Language
netfilter, the developers of iptables.
netfilter packet filtering HOWTO
Web Design Group (htmlhelp.com)
HTML Validator
CSS Check
A List Apart: The Trouble With EM 'n EN
useful character references “ & ” & …
QoS Connection Tuning HOWTO
Simple TC/QoS solution with iptables & tc. Pretty much what I used.
James C. Stephens' iptables pages (Connection tracking section with passive ftp info)
Example of a full nat solution with QoS
various traffic control tests & schemes
Linux - Advanced Networking Overview
Linux Firewall and CBQ Example Scripts
two different things. apt-key and debian-archive-keyring.
apt-key update will take the available keys and load them into apt's keyring.
But it is the following that is necessary when the key doesn't exist:
apt-get -d install debian-archive-keyring
dpkg -i /var/cache/apt/archives/debian-archive-keyring_YYYY.MM.DD_all.deb
apt-get update
make sure to make a menu.lst with your grub configuration parameters. make sure to include initrd if you are using it. make sure you have the correct kernel parameters (how you figure that out, i have no idea).
sample, enter during bootup if you have problems:
# root (hd0,0)
# find /boot/grub/stage1
# setup (hd0)
# kernel (hd0,0)/vmlinuz ro root=/dev/hda1
# initrd (hd0,0)/initrd.img
If grub boots to the grub> prompt rather than to linux, make sure you have the menu.lst file in /boot/grub/
menu.lst should look like:
default=0
timeout=30
title GNU/Linux
root (hd0,0)
kernel (hd0,0)/vmlinuz ro root=/dev/hda1
initrd (hd0,0)/intird.img
pine's license does not allow binary distributions, so you have to do silly things (compile!) to get it to work. here's the easy way on debian, pulled from:
http://www.cs.helsinki.fi/u/hendry/content/debian/debian-pine.shtml
make sure you have:
deb-src http://http.us.debian.org/debian stable main contrib non-free
or:
deb-src http://http.us.debian.org/debian unstable main contrib non-free
in your sources.list
run the following commands, as root, in a scratch directory:
apt-get install pine-tracker
apt-get --only-source build-dep pine
apt-get --only-source -b source pine
dpkg -i pine_{version_num}_i386.deb
OpenCMS wants ISO-8859-1 for HTTP responses. I believe that the W3C standard is UTF-8. In $CATALINA_HOME/webapps/opencms/WEB-INF/config/opencms.properties, change:
defaultContentEncoding=ISO-8859-1
to
defaultContentEncoding=UTF-8
This also requires an additional variable passed to tomcat at startup. In $CATALINA_HOME/bin/catalina.xml, change
<property name="catalina.jvm.args" value="-Dsun.io.useCanonCaches=false/>
to
<property name="catalina.jvm.args" value="-Dsun.io.useCanonCaches=false -Dfile.encoding=UTF-8"/>
On debian, mysql does not listen on tcp port 3306 by default (it just opens a socket). OpenCMS relies upon this TCP connection. To fix this, edit /etc/mysql/my.cnf, and comment out:
# skip-networking
Hard drives over 137GB will not register unless your kernel is >2.4.20.
from: Firewalling with iptables.
apt-get install iptables-dev kernel-headers-2.6.8-1-k7
tar xvfz ipp2p*.gz
cd ipp2p
make
cp ibipt_ipp2p.so /lib/modules/iptables
cp ipt_ipp2p.ko /lib/modules/`uname -r`/kernel/net/ipv4
depmod
insmod ipt_ipp2p.ko
For me, kernel-headers-2.6.8-1-k7 was kernel-headers-2.4.26-1-386
This line:
IUSER = -I/usr/src/iptables-1.2.9/include
should be changed to:
IUSER = -I/usr/include
Since I am using a 2.4 kernel, ipt_ipp2p.ko becomes ipt_ipp2p.o
And ibipt_ip2p.so above is a typo, I believe, and should be libipt_ipp2p.so
# apt-get install bzip2Get and unzip iptables source:
# cd /usr/src # mkdir iptables # cd iptables # wget http://netfilter.org/files/iptables-1.2.11.tar.bz2 # tar -xjf iptables-1.2.11.tar.bz2Get ipp2p
# wget http://rnvs.informatik.uni-leipzig.de/ipp2p/downloads/ipp2p.tar.gz # tar -xvvzf ipp2p.tar.gz # cd ipp2p-0.7.1Edit the Makefile to reflect the location of the iptables source:
IUSER = -I/usr/src/iptables-1.2.9/include
should become:
IUSER = -I/usr/src/iptables/iptables-1.2.11/include
Build ipp2p
# makeI get output:
gcc -O3 -Wall -I/lib/modules/2.4.27-1-386/build/include -c ipt_ipp2p.c -D__KERNEL__ -DMODULE
In file included from /lib/modules/2.4.27-1-386/build/include/linux/spinlock.h:6,
from /lib/modules/2.4.27-1-386/build/include/linux/module.h:12,
from ipt_ipp2p.c:1:
/lib/modules/2.4.27-1-386/build/include/asm/system.h: In function `__set_64bit_var':
/lib/modules/2.4.27-1-386/build/include/asm/system.h:190: warning: dereferencing type-punned pointer will break strict-aliasing rules
/lib/modules/2.4.27-1-386/build/include/asm/system.h:190: warning: dereferencing type-punned pointer will break strict-aliasing rules
gcc -O3 -Wall -DIPTABLES_VERSION=\"1.2.11\" -I/usr/src/iptables/iptables-1.2.11/include -fPIC -c libipt_ipp2p.c
ld -shared -o libipt_ipp2p.so libipt_ipp2p.o
Copy the modules to the appropriate places:
# cp libipt_ipp2p.so /lib/iptables/ # cp ipt_ipp2p.o /lib/modules/`uname -r`/kernel/net/ipv4Load the module:
# depmod depmod: *** Unresolved symbols in /lib/modules/2.4.27-1-386/kernel/net/ipv4/ipt_ipp2p.o # insmod ipt_ipp2p.o
find . -type f -exec sed -i 's|from|to|g' {} \;
5 0 * * * /bin/sh /root/cron/checkimap
script:
#!/bin/bash
DATE=`date -d YESTERDAY +"%b %e"` # yesterday's date to match logs
YEAR=`date -d YESTERDAY +"%Y"` # yesterday's year for the subject
SUB="Imap logins for ${DATE}, %{YEAR}" # subject for email
# grep for the users in the logs
BODY=`grep "${DATE}" /var/log/syslog* | grep "imap-login" | grep -o "Login: user=<\([-a-z0-9_]*\)>" \
| sed 's|Login: user=<\([-a-z0-9_]*\)>| \1|g' | sort | uniq`
# send the mail to root
mail -s "${SUB}" root <<-END
Imap logins for yesterday (${DATE}, %{YEAR}):
${BODY}
END
In mutt, use T to 'tag' the messages with a pattern, use 'Imap logins'.
After tagging the messages, use ; to apply the export to only the tagged messages, then s to save the messages to a file. 'imap-logins' is a good choice.
Use U to undelete the tagged messages (they get automatically marked for deletion), and quit mutt.
Finally, use grep "^ " imap-logins | sort | uniq to get a unique list of users that have logged in.
Mutt has various patterns one can use to select messages, in conjunction with the limit l command or when tagging by a pattern T. These can be chained to produce a set of messages filtered by several criteria.
Filtering by the subject: ~s PATTERN
Filtering by date: ~d DD/MM/YY-DD/MM/YY leaving off either date, but including the - will filter before or after the remaining date.
For example, finding messages with "Imap" in the subject, after the 10th of January, 2009: ~s Imap ~d 10/01/2009-
In files transfered from windows/dos to unix, you'll often see ^M at the end of each newline. This is because the unix linebreak is just \n while the dos linebreak is \n\r. Occasionally you'll also get file accidentally named with a ^H in them. You can get rid of these either with sed or vi find/replace, but you have to figure out how to type it first. Here's how:
For ^<LETTER>, type Ctrl-V Ctrl-<LETTER>. So For the carriage return, you'd type Ctrl-V Ctrl-M. This works both in vi and on the commandline.
All class functions have self as an argument because calls of the form instance.func(arg1, arg2) are translated into Class.func(instance, arg1, arg2)! Weird!!
Arguments to functions prefixed by a * or ** are interpreted as either positional or keyword parameters. So in def func(*listvar, **dictvar):, the listvar would be expanded positionally and the dictvar would be expanded keywordally (ha!)
You speak english but want to input characters with diacritics. You therefore want the en_US.UTF-8 locale. Run dpkg-reconfigure locales. Select en_US.UTF-8, set as default language. When this is done, ensure that you have /etc/default/locale with LANG=en_US.UTF-8 and /etc/locale.gen with en_US.UTF-8 UTF-8 in it.
In the putty configuration screen, load the profile for the server, go to window -> translation and set "Received data assumed..." to UTF-8.