FIREWALL.INI:
# Firewall setup.
#
# Setting up ipchains and ipmasqadm
#
. /etc/config
#
# Flushing the chains.
#
ipchains -F
#
# Policy for forwarding, Masquerade
#
ipchains -P forward MASQ
#
# another example:
# ipchains -A forward -i ${OUTSIDE_DEV} -j MASQ
#
# Timeouts for the masqueraded connections.
#
ipchains -M -S 6000 120 300
#
# Minimum delay for SSH.
#
ipchains -A output -p tcp -d 0.0.0.0/0 22 -t 0x01 0x10
#
# We don't like the NetBIOS and Samba leaking..
#
/bin/ipchains -I input -j REJECT -p TCP -s 0/0 -d 0/0 137:139
/bin/ipchains -I input -j REJECT -p UDP -s 0/0 -d 0/0 137:139
#
# Finally, list what we have
#
ipchains -L
#
# ipmasqadm takes care of connections from the outside to the inside.
# Remove the comments to set it up.
#
#ipmasqadm portfw -a -P tcp -L $1 80 -R 192.168.0.<SERVER-IP> 80
#ipmasqadm portfw -a -P tcp -L $1 22 -R 192.168.0.<SERVER-IP> 22
#ipmasqadm portfw -a -P tcp -L $1 2222 -R 192.168.0.<SERVER-IP> 22
#
# Rules set, we can enable forwarding in the kernel.
#
echo "Enabling IP forwarding."
echo "1" > /proc/sys/net/ipv4/ip_forward
NETWORK.INI:
#!/bin/sh
#
# Remember to set up the network interface card with IRQ and base address
# in syslinux.cfg
#
# Edited by Edo-Martijn Janssen 16-4-2001.
#
#
# Grabbing the config.
#
. /etc/config
/bin/ifconfig lo 127.0.0.1
#
# Inside:
#
/bin/ifconfig ${INSIDE_DEV} ${INSIDE_IP} netmask ${INSIDE_NETMASK} broadcast ${INSIDE_BROADCAST}
echo "${INSIDE_IP}${HOSTNAME}.inside" >> /etc/hosts
#
# Outside
#
# Setting up secrets files in case they're necessary
#
echo "Creating pap-secrets and chap-secrets files"
echo "This file created by network.ini" > /etc/ppp/pap-secrets
echo "#User#Server#Password#IP" >> /etc/ppp/pap-secrets
echo "'${USER_IDENT}'*'${USER_PASSWORD}'*" >> /etc/ppp/pap-secrets
chmod 600 /etc/ppp/pap-secrets
cp /etc/ppp/pap-secrets /etc/ppp/chap-secrets
#
# boot up the appropriate network protocol
#
case "${OUTSIDE_IP}" in
PPTP)
echo "Preparing for PPTP"
# For PPTP we need these modules
if [ ! -e /lib/modules/ppp.o ] ; then
echo "You must have the package ppp.bz2 installed to use PPP."
exit 1
fi
if [ ! -e /bin/pptp ] ; then
echo "You must have the package pptp.bz2 installed to use PPTP."
exit 1
fi
echo "Creating options file."
# edit the ppp 'options' file as necessary
echo "idle 0" > /etc/ppp/options
echo "debug" >> /etc/ppp/options
echo "noauth" >> /etc/ppp/options
echo "user \"${USER_IDENT}\" " >> /etc/ppp/options
echo "noauth" >> /etc/ppp/options
echo "usepeerdns" >> /etc/ppp/options
echo "defaultroute" >> /etc/ppp/options
/bin/ifconfig ${MODEMSIDE_DEV} ${MODEMSIDE_IP} netmask ${MODEMSIDE_NETMASK} broadcast ${MODEMSIDE_BROADCAST}
;;

echo " "
echo "This floppy can only use PPTP."
echo "Set PPTP behind OUTSIDE_IP in config file."
;;
esac
echo "Setting up name server (etc/resolv.conf) "
echo "domain ${DOMAIN}" >> /etc/resolv.conf
echo "search ${DOMAIN}" >> /etc/resolv.conf
echo "nameserver ${NAME_SERVER_IP1}" >> /etc/resolv.conf
echo "nameserver ${NAME_SERVER_IP2}" >> /etc/resolv.conf
echo "1" > /proc/sys/net/ipv4/tcp_syncookies
if [ -f /proc/sys/net/ipv4/conf/all/rp_filter ] ; then
echo "Enabling anti spoofing: "
for f in /proc/sys/net/ipv4/conf/*/rp_filter; do
echo -n " $f "
echo 1 > $f
done
else
echo "Anti spoofing is not available, the author of this floppy spoofed, mail him."
fi
misschien hebben jullie hier wat aan