#!/bin/bash

printf "ALL: localhost" >> /etc/hosts.allow
for I in `ifconfig | grep "inet addr" | cut -f2 -d: | cut -f1-3 -d"." \
    | grep -v ^127 | sort -n`
do
    echo "Adding (, $I) to /etc/hosts.allow."
    printf ", $I." >> /etc/hosts.allow;
done
echo >> /etc/hosts.allow
chown root:root /etc/hosts.allow
chmod 0644 /etc/hosts.allow
echo "diff /etc/hosts.allow-preCIS /etc/hosts.allow"
diff /etc/hosts.allow-preCIS /etc/hosts.allow
