IPFW-Problem bei Namensauflösung über dsl-Gateway

From: Gordon E. <bitoxin(at)web.de>
Date: Sun, 16 Sep 2001 15:08:33 +0200

Moin !!

Ich verwende eine FBSD4.3-Kiste als dsl-Gateway.
Läuft alles super. Allerdings habe ich nun begonnen die Firewall-Regeln
aufzustellen. Seitdem bekomme ich über die Clients keine Nameserver-Auflösung
mehr zu stande. Im Klartext heißt das, daß ich www.freebsd.org nicht aufrufen
kann (ping, www, usw.) sondern lediglich über die IP-Adresse (216.136.204.21)
Kontakt bekomme. Mit dem NAT und der Zugriff-Erlaubnis scheint firewallseitig
also alles in Ordnung zu sein. Namesauflösung vom Gateway nach draußen
funktioniert ebenfalls ohne Probleme.

Wie muß also eine Regel aussehen, die DNS über das dsl-Gateway vom Client
nach draußen (und zurück) zulässt ???
(/etc/resolv.conf ist auf Client vorhanden und läuft ohne die Firewall bzw.
mit "ipfw add allow all from any to any" problemlos).

Ich bin mir sicher, daß mir jemand von Euch bei diesem Problem helfen kann
und bin auf Antworten von Euch gespannt.

Gruß Gordon Engelke

meine /etc/rc.conf:

------------------------------ schnipp --------------------------------

# This file now contains just the overrides from /etc/defaults/rc.conf
# please make all changes to this file.
 
hostname="blah"
 
ifconfig_ed1="inet 192.168.0.99 netmask 255.255.255.0"
ifconfig_ed0="up"
 
ppp_enable="YES"
ppp_mode="ddial"
ppp_profile="tdsl"
ppp_nat="NO"
 
natd_enable="YES"
natd_interface="tun0"
natd_flags="-dynamic"
sysctl -w net.inet.ip.forwarding=1
 
firewall_enable="YES"
firewall_script="/etc/ipfw.rules"
firewall_logging_enable="YES"
firewall_quiet="YES"
 
gateway_enable="YES"
 
inetd_enable="NO"
sendmail_enable="NO"
sshd_enable="YES"
 
kern_securelevel_enable="YES"
keymap="german.iso"

------------------------------ schnapp --------------------------------

meine Firewall-Regeln (/etc/ipfw.rules):

------------------------------ schnipp --------------------------------

##########################################################################
#
# Firewall-Konfiguration (FreeBSD 4.3)
#
###########################################################################
 
LAN_LINUX="192.168.0.11"
LAN_FBSD="192.168.0.99"
 
NETDEV_LOOP="lo0" # Loopback-Device
NETDEV_WORLD="tun0" # Interface zum Internet
#NETDEV_LAN_1="ed0" # Interface zum LAN (für dsl)
#NETDEV_LAN_2="ed1" # Interface zum LAN
 
#==========================================================================
# Setze 'quiet mode' falls verlangt (/etc/rc.conf: firewall_quiet="YES")
#==========================================================================
 
        case ${firewall_quiet} in
 
        [Yy][Ee][Ss])
                fwprg="/sbin/ipfw -q"
                ;;
        *)
                fwprg="/sbin/ipfw"
                ;;
        esac
 
#=========================================================================
# vorhandene Regeln loeschen
#=========================================================================
 
        ${fwprg} -f flush

#=========================================================================
# 'natd' starten falls verlangt (/etc/rc.conf: natd_enable="YES")
#=========================================================================
 
        case ${natd_enable} in
 
        [Yy][Ee][Ss])
        # if [ -n "${NETDEV_WORLD}" ]; then
                ${fwprg} add divert natd all from any to any via $NETDEV_WORLD
        # fi
                ;;
        *)
                ;;
        esac
 
#==========================================================================
# Beginn der Filterregeln
#==========================================================================
 
 
#======== das loopback-device freigeben =================================
 
        ${fwprg} add allow all from any to any via $NETDEV_LOOP
 
#======== RESET an alle ident-Pakete ====================================
 
# ${fwprg} add reject tcp from any to any 113 in recv $NETDEV_WORLD
 
#======== erlaube DNS-Anfrage ==========================================
 
        ${fwprg} add allow udp from any to any 53 out xmit $NETDEV_WORLD

#======== erlaube DNS-Antwort ===========================================
 
        ${fwprg} add allow udp from any to any 53 in recv $NETDEV_WORLD
 
#======== Regeln fuer das PING-Verhalten ================================
 
        ${fwprg} add 65400 allow icmp from any to any
 
#======== Verbindung innerhalb LAN erlauben =============================
 
        ${fwprg} add allow all from $LAN_LINUX to $LAN_FBSD
        ${fwprg} add allow all from $LAN_FBSD to $LAN_LINUX

# ${fwprg} add 65500 pass all from any to any
 
#==========================================================================
# Ende der Filter-Regeln
#==========================================================================

------------------------------ schnapp --------------------------------

______________________________________________________________________________
Sie surfen im Internet statt im Meer? Selbst schuld!
Auf zum Strand: http://lastminute.de/?PP=1-0-100-105-1

To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Sun 16 Sep 2001 - 15:09:12 CEST

search this site