[volunteers] Initial work on new host

Rick Moen rick at linuxmafia.com
Fri Dec 15 03:23:24 PST 2006


Hey, before I toddle off to sleep, let's see if I can recap the last
couple of hours of (initial) work on the new machine.  Mind, I've done
little of the necessary configuration work on network services (Web
server, MTA...), yet.  

What I've done is a bit of security lockdown, removal of unwanted
packages left over from install, making sure the sshd is reachable
additionally on ports 23/tcp (telnet) and 8080/tcp for those behind
firewalls.  

I fixed the /etc/apt/sources.list file (roster of package sources to
consult) to include the full range of Debian "testing" packages plus
Debian "unstable" packages, removed the (obstructive) line saying to
consult the installation CD for some packages, added the full range of
Debian Security Team coverage, and created /etc/apt/preferences to make
Debian "unstable" packages never be fetched unless that branch is
specified explicitly in the package-fetch command.  

Then, I added a bunch of packages not yet installed that I thought might
be neeeded, and, last, removed unneeded cruft using deborphan,
debfoster, and "apt-get clean".

1.  Security lockdown:  There were some portmapper and NFS daemons still
running, and an NFS service mount.  I removed/killed those.  I checked
all running services, to make sure there wasn't something strange still
there.  I also removed the root user's ability to ssh in directly.  (Of
necessity, I added a "rick" account, at that time.  ;->  )

2.  Package removal:  There were a number of packages' configuration
files still present, though the packages themselves had been snipped:

# dpkg --purge analog apache2.2-common

# dpkg --purge bind9 exim4 exim4-base exim4-config exim4-daemon-light libapache2-mod-perl2 libapache2-mod-php4 libapache2-mod-python libapr1 libaprutil1 libasn1-6-heimdal libc-client2002edebian libcupsys2 libexpat1 libfam0 libfreetype6 libgssapi4-heimdal libkrb5-17-heimdal libpng12-0 libpq4 libroken16-heimdal libslp1 libsocket6-perl libsqlite3-0 libxml2 libzzip-0-12 localization-config lwresd mailagent mailx netatalk nfs-kernel-server openssl

# dpkg --purge  php4-common postgresql postgresql-common postgresql-client postgresql-client-common qpopper sa-exim samba samba-common spamassassin ssl-cert swat uw-imapd winbin

# dpkg --purge postgresql-7.4

Then there were fully installed package that are not wanted at this
time:

c# apt-get --purge remove cyrus-sasl2-doc dhcp3-client dhcp3-common
gnu-efi laptop-detect lpr nbsmtp nfs-common  portmap policycoreutils
python-selinux python-semanage selinux-policy-refpolicy-targeted

3.  Package additions:

# apt-get install apache apache-common apache-utils apt-show-versions aspell aspell-en asr-manpages autoconf automake autotools-dev bittorrent bzip2 bzr mercurial ca-certificates  chkrootkit cowsay debfoster debhelper debian-keyring debian-policy debmake deborphan debsums developers-reference dh-make-perl dialog dict dlocate doc-base exim4 exim4-base exim4-config exim4-daemon-heavy exim4-doc-html fakeroot fileutils filters fortune-mod fortunes fortunes-min fortunes-off ftp-ssl gawk gcal groff indent iputils-ping irssi irssi-scripts irssi-text jargon kernel-package localepurge logcheck logcheck-database nsd

# apt-get install lynx mailman miscfiles mkisofs mmv moinmoin-common mutt netdiag nmap ntp ntp-simple ntpdate pciutils perl-doc python-moinmoin razor rkhunter rsync sa-exim shellutils slay spamassassin spamc srs ssl-cert stow ssl-cert talk tasksel tcptraceroute telnet-ssl tex-common textutils tidy tidy-doc tmpreaper tofrodos units unzip urlview uudeview zipa

Then, selected packages in the "Suggested packages" or "Recommended
packages" for the newly installed ones, above:


# apt-get install apache-doc apache-ssl apache-perl aspell-doc spellutils funny-manpages autoconf2.13  dh-make devscripts doc-central  eximon4 libmail-spf-query-perl gettext-doc  linux-source-2.6.18 apt-file rcs listadmin ntp-doc  libnet-ident-perl  dcc-client pyzor ncftp2 lftp ncftp mimedecode libmailtools-perl libhtml-format-perl libmd5-perl libmail-spf-query-perl automake1.4 


Create Mailman's housekeeping mailing list, called "mailman":

# cd /var/lib/mailman/bin
# ./newlist mailman


Fetch the "EximConfig" package of MTA antispam configuration files and
extras:

# cd /usr/local/src/
# wget www.jcdigita.com/eximconfig/eximconfig.tar.gz



Following deborphan's recommendations about libs no longer needed:

# dpkg --purge librpcsecgss3 libident libtextwrap1 libsemanage1 libc6-amd64 liblzo2-2 libevent1 libnfsidmap2 libgssapi2 libsigc++-1.2-5c2 libldap-2.3-0

(I checked with debfoster, too, but it found nothing additional that
needed to be stripped out.)


That's about it, for now.  Next up will probably be configuring network
services.  I think we might actually have nearly 100% of the necessary and
useful pieces.  (I might need a couple of packages to support optional
EximConfig featurees like greylisting, but that's probably it.) If not,
additional stuff is a single apt-get command away, generally.



Here is the revised /etc/apt/sources.list:

deb http://mirrors.kernel.org/debian/ testing main contrib non-free
deb http://mirrors.kernel.org/debian/ unstable main contrib non-free

deb http://security.debian.org/ testing/updates main contrib non-free
deb http://security.debian.org/ stable/updates main contrib non-free

deb-src http://mirrors.kernel.org/debian/ testing main contrib non-free
deb-src http://security.debian.org/ testing/updates main contrib non-free


The original sources.list file had omitted the "contrib" and "non-free" 
collections, omitted the "unstable" branch, and not included all the
security update collections.  Also, it had specfiied "etch" by name,
rather than "testing".  I vastly prefer that the system remain on the
"testing" package track indefinitely, transitioning automatically onto
the etch+1 next branch (thus far, unnamed) that will be launched around
the time of etch's release.  I've had production servers doing that for
many years.


Here is /etc/apt/preferences, "pinning" all unstable branch packages
deliberately to a sub-normal priority of 50 (normal=100) so that they 
won't ever be fetched without that branch being explicitly specified:

Package: *
Pin: release a=unstable
Pin-Priority: 50


(The result is to have the box track Debian "testing" packages by default, 
but with access to "unstable" branch packages upon explicit request.)






More information about the volunteers mailing list