On a freshly installed Ubuntu system (in ths case installed from a disk containing the Ubuntu-6.06-desktop-i386.iso), first you need to load a number of package
First get a suitable editor:
sudo apt-get install emacs21
Next prepare for secure remote access:
sudo apt-get install iptables ssh
Next get the kernel sources - so that you have the needed include files. Make the existing kernel configuration and build a kernel.
sudo apt-get install linux-source-2.6.15 cd /usr/src sudo tar -xjf linux-source-2.6.15.tar.bz2 sudo ln -sf linux-source-2.6.15 linux sudo apt-get install kernel-package linbcurses5-dev cd /usr/src/linux sudo make oldconfig
At this point you can adapte the kernel configuration for what your computer needs, then build a new kernel. Note the "-initrd" flag to create the RAM disk image which is needed when booting using grub.
sudo make-kpkg -initrd kernel-image sudo dpkg -i kernel-image-2.6.15.7-ubuntu1_10.00.Custom_i386.deb This produced a kernel named: 2.6.15.7-ubuntu1
Get the X11 include files:
sudo apt-get install xlibs-dev sudo apt-get install libxaw-headers sudo apt-get install libxaw7-dev sudo apt-get install xaw3dg-dev sudo apt-get install qt3-doc qt3-dev-tools qt3-apps-dev sudo apt-get install lsb-cxx
To fix the following problems with compiling of knistnet:
/home/maguire/nistnet-3.0a/kernel/knistnet.c:916: error: too few arguments to function ippt->func /home/maguire/nistnet-3.0a/kernel/knistnet.c:961: error: too few arguments to function ippt->func /home/maguire/nistnet-3.0a/kernel/knistnet.c:972: error: too few arguments to function ippt->func /home/maguire/nistnet-3.0a/kernel/knistnet.c:1003: error: too few arguments to function ippt->func
you simply need to add another argument to the call, so that it looks like:
return ippt->func(skb, dev, ippt, NULL);
After doing the 'make' and 'make install', I cheated and manually added a line to the file /lib/modules/2.6.15.7-ubuntu1/modules.dep
/lib/modules/2.6.15.7-ubuntu1/extra/nistnet.ko:
Thus the modprobe in the Load.Nistnet now finds the nistnet module.
If you get error messages: saying
error: syntax error before KBUILD_BASENAME
Change nistnet/Config: EXTRA_CFLAGS += $(OURINCS) $(DEVDEFS) -fno-common to EXTRA_CFLAGS += $(OURINCS) $(DEVDEFS) -fno-common -DKBUILD_MODNAME=\"nistnet\" -DKBUILD_BASENAME=\"nistnet\"
See http://www.ubuntuforums.org/archive/index.php/t-192942.html for details.
An alternative to building the new kernel is to set up the dependencies information:
cd /usr/src/linux - or wherever the kernel source is make oldconfig - exit and save make dep
For further details see: http://www-x.antd.nist.gov/nistnet/install.html
If you get the following error at runtime, upon starting xnistnet:
globalstatnistnet: No such file or directory
and then when trying to insert a new rule after clicking the update button:
util_binaddnistnet: No such file or directory Error adding 192.168.0.1 -> 192.168.10.1: addnistnet: Illegal seek
then there are a number of /dev files missing to recreate them do (as root) :
mknod /dev/hitbox c 62 0 mknod /dev/nistnet c 62 1 chown root /dev/hitbox chown root /dev/nistnet mknod /dev/mungebox c 63 0 chown root /dev/mungebox mknod /dev/spybox c 64 0 chown root /dev/spybox
For further details see http://www.mail-archive.com/nistnet@antd.nist.gov/msg00141.html
a© Copyright 2006 G.Q.Maguire Jr. (maguire@it.kth.se)
All Rights Reserved.
Last modified:
2007--1-11 14:27:42 MET 2007