Thomas shares makes

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 your 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

apt-get install gcc binutils build-essential make
# kernel
apt-get install kernel-package ncurses-dev wget bzip2
tar xf linux-...
make menuconfig
make dep
make-kpkg clean && fakeroot make-kpkg --revision=custom.1.0 kernel_image
dpkg -i kernel-??.deb

aide

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
cat >/floppy/check.sh
#!/bin/bash
/floppy/aide --config:/floppy/aide.conf -C
^D
cat >/floppy/update.sh
#!/bin/bash
/floppy/aide --config=/floppy/aide.conf --update
mv /floppy/aide.db.new /floppy/aide.db
^D
sync
umount /floppy
# activate write protect switch
vi /etc/fstab # remove user,noauto from /floppy/ entry
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 /usr/local/src/
wget 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 /usr/local/src/
wget source tarball
tar xvzf source tarball
cd giFT-openft-xxx
./configure
make && make install

package gift-fasttrack

cd /usr/local/src/
wget source tarball
tar xvzf source tarball
cd giFT-FastTrack-xxx
./configure
make && make install

package gift-gnutella

cd /usr/local/src/
wget source tarball
tar xvzf source tarball
cd giFT-FastTrack-xxx
./configure
make && make install

Liked something? Worked on something similar? Let me know what you think on Mastodon!
You can direct-message me, or mention me @thouters@hsnl.social
Follow me on Mastodon!