Thomas makes, writes

2006-07-18

Notes about my old LAN server

photo

My old server functioned as an internet gateway and DHCP and masquerading DNS server. The last two are not necessary, but it's always easy if you just have to plug you cable into the lan, and don't have to configure you network adapters. It also ran an apache web server, to provide an interface to some functions.

Pictures

thumb
placed
hoog1.jpg
thumb
placed
hoog2.jpg
thumb
modem and coax repeater
modem-repeater.jpg
thumb
Server on my desk
pc330-1.jpg
thumb
coax repeater with MAU
repeater-MAU.jpg
thumb
back of server
server-back.jpg
thumb
front of server
server-front.jpg
thumb
network cards
server-nics.jpg

Hardware

  • Intel Pentium I at 166Mhz
  • 96MB RAM
  • Maxtor 40GB hard disk
  • D-Link 528 10Mbit Ethernet Card (eth0) -> LAN
  • Realtek 10/100Mbit Ethernet Card (eth1)-> SpeedTouch Home ADSL modem.

Software

  • a Linux 2.4.xx kernel
  • iptables
  • dnsmasq
  • dhcp daemon
  • apache
  • sshd

Post install steps

First I set up a base Debian system (didn't have to change much of the default configuration). Then I made some modifications.

configure networking

  • ADSL: run pppoeconf. Don't forget to enter your username as user@PROVIDER
  • Cable Internet: hook up your modem to an Ethernet card and configure that card to use DHCP (in /etc/network/interfaces)

Create filesystems

  • create /home fs:
mke2fs -j /dev/hda3
mv home home-tmp
mkdir home
fstab-update
mount /home
mv home-tmp/* home/

User Administration

edit /etc/issue /etc/issue.net /etc/motd adduser thomas, simon, gift edit /etc/passwd, login shell for simon & gift=/bin/false

Network services

ipmasq ssh: enable sshd, use ssh2, PermitRootLogin no dnsmasq: /etc/default/dnsmasq; DNSMASQ_INTERFACE="eth1" uncomment #DHCP_LEASE dhcp cp oldetc/dhcpd.conf /etc/dhcpd.conf samba use encrypted passwords, create smbpasswd

Kernel

maketools:(aptget them) gcc binutils build-essential make kernel: apt-get install kernel-package ncurses-dev wget bzip2 unpack tarball make menuconfig make dep make-kpkg clean && fakeroot make-kpkg --revision=custom.1.0 kernel_image dpkg -i kernel-??.deb

aide

(Looking back this aide setup seems foolish?)

apt-get install aide
(put blank floppy in fd0) mke2fs /dev/fd0
mount /floppy
cp /var/lib/aide/aide.db.new /floppy/aide.db
cp /usr/bin/aide /floppy
cp /etc/aide/aide.conf /floppy
  #!/bin/bash
  /floppy/aide --config:/floppy/aide.conf -C
  -> /floppy/check.sh
  #!/bin/bash
  /floppy/aide --config=/floppy/aide.conf --update
  mv /floppy/aide.db.new /floppy/aide.db
  sync
  -> /floppy/update.sh
umount /floppy
(put write protect on)
remove user,noauto from /floppy/ entry in fstab
mount /floppy

Administration tools

  • file
  • lsof
  • Vim: VI improved
  • nmap: port scanner

Webserver services

  • apache: the apache web server
  • php: PHP hypertext preprocessor
  • mysql: mysql database
  • popa3d: pop server (to get the mail to your workstation)

Installing giFT

note: When I tried to run ./configure, the compiling tools appeared not to be installed, if you have the same problem, run "apt-get install gcc binutils build-essential make"

package gift

  • cd to /usr/local/src/
  • download the source tarball sourcetarball.tar.gz
  • tar xvzf sourcetarball.tar.gz
  • cd sourcedir
  • apt-get install libltdl
  • ./configure
  • make && make install

package gift-openft

  • apt-get install zlib1-dev pkg-config
  • cd to /usr/local/src/
  • download the source tarball
  • tar xvzf source tarball
  • cd giFT-openft-xxx
  • ./configure
  • make && make install

package gift-fasttrack

  • cd to /usr/local/src/
  • download the source tarball
  • tar xvzf source tarball
  • cd giFT-FastTrack-xxx
  • ./configure
  • make && make install

package gift-gnutella

  • cd to /usr/local/src/
  • download the source tarball
  • tar xvzf source tarball
  • cd giFT-FastTrack-xxx
  • ./configure
  • make && make install