PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : suse6.3 firewall konfiguration?(abdate?)



01.03.01, 05:14
suse6.3 firewall konfiguration?(abdate?)
hallo,
ich arbeite mit suse6.3 und möchte eine Firewall mit Paketfilterung einrichten?
suse schreibt"Falls Sie SuSE Linux 6.4 benutzen laden Sie bitte das Update auf firewals 2.1 von ftp://ftp.suse.com/pub/suse/i386/update/6.4/sec1/firewals.rpm."
also, ich habe mir das paket heruntergeladen, mit yast installiert.
Mein Problem?! in der etc/ steht jetzt nicht mehr rc.firewall sondern rc.firewall.rpm_save
und rc.firewall.rpmsave
desweiteren steht in diesen verzeichnissen
/etc/rc.firewall
for use with /usr/sbin/SuSEfirewall version 1.2
wie ich das sehe, das neue paket wurde nicht eingespielt
oder wie habe ich das zu verstehen???

desweitern frage ich mich ob ich dies hier richtig verstanden habe?
Wenn Ihr Firewall ein Einwahlrechner mit dynamischen IP-Adressen ist, müssen Sie den Aufruf von /sbin/SuSEfirewall in das Script /etc/ppp/ip-up eintragen.

Für ISDN am besten am Ende der Einwahlprozedur, also vor der Zeile:
test -x /etc/ppp/ip-up.local && /etc/ppp/ip-up.local $*

und beim Auflegen nachdem das Interface wieder aktiviert wurde, also vor der Zeile:
test -x /etc/ppp/ip-down.local && /etc/ppp/ip-down.local $*

also so???
/sbin/SuSEfirewall
test -x /etc/ppp/ip-up.local && /etc/ppp/ip-up.local $*

vielen dank
mfg
gizmo

01.03.01, 08:11
Hi Gizmo,

also folgendes... Die "neue" Firewall bzw das Konfigscript liegt jetzt unter /etc/rc.config.d und heisst firewall.rc.config .

In der Ip-UP solltest Du BEVOR die Einwahl statfindet rcfirewall stop schreiben. Nach der Zeile mit den Nameservern /steht im script) schreibst Du rcfirewall start.
Das brauchst Du, weil sich ja bei jeder Einwahl die DEFAULTROUTE zu Deinem Einwahlrouter ändert.

Gruß Alex

01.03.01, 17:24
vielen dank schonmal an alex :-)

da hätte ich ja superlange suchen können, mit der rc.firewall :-(

"In der Ip-UP solltest Du BEVOR die Einwahl statfindet rcfirewall stop schreiben. Nach der Zeile mit den Nameservern /steht im script) schreibst Du rcfirewall start.
Das brauchst Du, weil sich ja bei jeder Einwahl die DEFAULTROUTE zu Deinem Einwahlrouter ändert"

dürfte ich dich nochmal nach den nameservern fragen, habe in das skript Ip-UP geschaut finde jedoch KEINE nameserver :-(
bin leider auch noch nicht allzulange dabei, könnte vielleicht mal jemand einen blick darauf werfen?#!/bin/sh

# (c) '97, S.u.S.E. GmbH, Fuerth, Germany
# Klaus Franken <kfr@suse.de>
# 25.02.98
#
# Remo Behn <sray@suse.de>
# 18.07.98

BASENAME=`basename $0`
INTERFACE=$1
DEVICE=$2
SPEED=$3
LOCALIP=$4
REMOTEIP=$5

if [ -z "$REMOTEIP" ]; then
echo "Usage: $0 <INTERFACE> <DEVICE> <SPEED> <LOCALIP> <REMOTEIP>"
exit 1
fi


case "$INTERFACE" in
ippp*)

. /etc/rc.config

# find the device
found=0
for I in $NETCONFIG; do
eval NETDEV=\$NETDEV$I
if [ $NETDEV = $INTERFACE ]; then
found=1
break;
fi
done
if [ $found -eq 0 ]; then
echo "Device '$INTERFACE' not configured in '/etc/rc.config'"
exit 1
fi

eval IFCONFIG=\$IFCONFIG$I
DEST=`grep -v "^#" /etc/route.conf | grep "$INTERFACE\$" | awk '{ print $1}'`
DEFAULT=`grep -v "^#" /etc/route.conf | grep default | awk '{ print $2}'`

#echo "ok, NETDEV:$NETDEV; IFCONFIG:$IFCONFIG."
#echo " DEST: $DEST; DEFAULT: $DEFAULT"

case "$BASENAME" in
ip-up)
# default deny
#ipfwadm-wrapper -I -p deny
#ipfwadm-wrapper -O -p deny

# flush
#ipfwadm-wrapper -I -f
#ipfwadm-wrapper -O -f

# accept dns
#ipfwadm-wrapper -O -a accept -P udp -S 0/0 53 1024:65535 -D 0/0 53 -W $INTERFACE
#ipfwadm-wrapper -I -a accept -P udp -D 0/0 53 1024:65535 -S 0/0 53 -W $INTERFACE
#ipfwadm-wrapper -O -a accept -P tcp -S 0/0 53 1024:65535 -D 0/0 53 -W $INTERFACE
#ipfwadm-wrapper -I -a accept -P tcp -D 0/0 53 1024:65535 -S 00/0 53 -k -W $INTERFACE

# accept connect from client to internet
#ipfwadm-wrapper -O -a accept -P tcp -S 0/0 1024:65535 -D 0/0 -W $INTERFACE
#ipfwadm-wrapper -I -a accept -P tcp -D 0/0 1024:65535 -S 0/0 -k -W $INTERFACE

# deny, last match
#ipfwadm-wrapper -I -a deny -P tcp -S 0/0 -D 0/0 -W $INTERFACE
#ipfwadm-wrapper -I -a deny -P udp -S 0/0 -D 0/0 -W $INTERFACE

# default accept
#ipfwadm-wrapper -I -p accept
#ipfwadm-wrapper -O -p accept

/sbin/route add default gw $REMOTEIP dev $INTERFACE

# maybe you want to start mail services:
# set follow variables in /etc/rc.config
# SENDMAIL_TYPE="yes"
# SENDMAIL_SMARTHOST="<ISP-mailserver>"
# SENDMAIL_ARGS="-bd -om"
# SENDMAIL_EXPENSIVE="yes"
# SENDMAIL_NOCANONIFY="yes"
#/usr/bin/fetchmail -a -v >>/var/log/fetchmail 2>&1 &
#/usr/sbin/sendmail -q &
;;
ip-down)
# restart interface
/sbin/ifconfig $INTERFACE down
# workaround due to kernel problem with 'kernd':
sleep 1
/sbin/ifconfig $INTERFACE $IFCONFIG

# flush, del all rules
#ipfwadm-wrapper -I -f
#ipfwadm-wrapper -O -f

# set routes from /etc/route.conf
test -z "$DEST" &#0124;&#0124; /sbin/route add -host $DEST dev $INTERFACE
test -z "$DEFAULT" &#0124;&#0124; /sbin/route add default gw $DEFAULT
;;
*)
;;
esac
;;


ppp*)
# Analog-PPP, add commands as you need...
case "$BASENAME" in
ip-up)
#
# This code allows automatic configuration of your resolv.conf
# for peer supplied DNS addresses when using the `usepeerdns'
# option. Original resolv.conf is restored when ip-down is called
# by pppd when the link goes down.
#
if [ -n "$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
rm -f /etc/ppp/resolv.prev
if [ -f /etc/resolv.conf ]; then
cp -p /etc/resolv.conf /etc/ppp/resolv.prev
grep domain /etc/ppp/resolv.prev > /etc/resolv.conf
grep search /etc/ppp/resolv.prev >> /etc/resolv.conf
cat /etc/ppp/resolv.conf /etc >> /etc/resolv.conf
echo "Modified /etc/resolv.conf for DNS at $INTERFACE"
else
cp /etc/ppp/resolv.conf /etc
chmod 644 /etc/resolv.conf
echo "Installed /etc/resolv.conf for DNS at $INTERFACE"
fi
if [ "$START_NSCD" = yes ]; then
/sbin/init.d/nscd restart &
fi
fi
/sbin/SuSEfirewall
test -x /etc/ppp/ip-up.local && /etc/ppp/ip-up.local $*
;;
ip-down)
#
# This code restores the original resolv.conf saved when ip-up
# was called by the pppd which uses the `usepeerdns' option and
# resolv.conf was modified for the supplied dns server adresses.
#
if [ -n "$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
if [ -f /etc/ppp/resolv.prev ]; then
cp -fp /etc/ppp/resolv.prev /etc/resolv.conf
echo "Restored original /etc/resolv.conf"
else
rm -f /etc/resolv.conf
echo "Deinstalled /etc/resolv.conf"
fi
if [ "$START_NSCD" = yes ]; then
/sbin/init.d/nscd restart &
fi
fi
/sbin/SuSEfirewall
test -x /etc/ppp/ip-down.local && /etc/ppp/ip-down.local $*
;;
*)
;;
esac | logger -t $BASENAME
;;
*)
# dont know...
;;

vielen dank schonmal gizmo