Subject: NetBSD 3.0 Problem mit ipf und ipnat
To: None <regional-de@NetBSD.org>
From: None <ebuemir@inode.at>
List: regional-de
Date: 02/01/2006 11:23:21
Hallo Liste
Ich bin neu in NetBSD und habe ein Problem mit ipf und ipnat.
Ich weiss jetzt nicht genau wo der Fehler liegt aber Ich werde versuchen
so gut wie möglich mein Problem darzustellen.
Und zwar folgendes:
Ich habe xDSL von inode.at also das schaut ungefähr so aus.
xDSL_Modem--->NetBSD3.0---->intranet
Die Verbindung bau Ich über pppoe auf.

ifconfig.pppoe0::
===========================================
# Um das Device zu erstellen
create
# Um das Interface das von PPPoE benutzt wird zu aktivieren
! /sbin/ifconfig rtk0 up
# Wir benutzen $int für rtk0
! /sbin/pppoectl -e rtk0 $int
# Authentifizierung konfigurieren
! /sbin/pppoectl $int myauthproto=pap 'myauthname=username@home'
'myauthsecret=passwort' hisauthproto=none
0.0.0.0 0.0.0.1 up
# eof
============================================
ipnat.conf schaut so aus:
=======================================
# NAT
map pppoe0 192.168.1.0/24 -> 0/32 proxy port ftp ftp/tcp
map pppoe0 192.168.1.0/24 -> 0/32 portmap tcp/udp auto
map pppoe0 192.168.1.0/24 -> 0/32
========================================
und ipf.conf ::
==============================================
# Kaputte oder gefärliche Pakete werden geblockt
block in log quick from any to any with ipopts
block in log quick proto tcp from any to any with short
block in log quick from any to any with frag
block in log quick from any to any with opt lsrr
block in log quick from any to any with opt ssrr

# Loopback wird erlaubt
pass out quick on lo0 from any to any
pass in  quick on lo0 from any to any

# Lokales Netzwerk ist erlaubt
pass out quick on rtk0 from any to any
pass in  quick on rtk0 from any to any
pass out quick on sk0 from any to any
pass in quick on sk0 from any to any
# Wir halten den Status aller Verbindungen von innen nach aussen
pass out quick on pppoe0 proto tcp from any to any flags S keep state keep
frags
pass out quick on pppoe0 proto udp from any to any keep state keep frags
pass out quick on pppoe0 proto icmp from any to any keep state keep frags

# Gefälschte oder unwahrscheinliche Pakete kommen nicht rein
block in log body quick on pppoe0 from 192.168.0.0/16 to any
block in log body quick on pppoe0 from 172.16.0.0/12 to any
block in log body quick on pppoe0 from 10.0.0.0/8 to any
block in log body quick on pppoe0 from 127.0.0.0/8 to any
block in log body quick on pppoe0 from 0.0.0.0/8 to any
block in log body quick on pppoe0 from 169.254.0.0/16 to any
block in log body quick on pppoe0 from 192.0.2.0/24 to any
block in log body quick on pppoe0 from 204.152.64.0/23 to any
block in log body quick on pppoe0 from 224.0.0.0/3 to any

block out log body quick on pppoe0 from any to 192.168.0.0/16
block out log body quick on pppoe0 from any to 172.16.0.0/12
block out log body quick on pppoe0 from any to 10.0.0.0/8
block out log body quick on pppoe0 from any to 127.0.0.0/8
block out log body quick on pppoe0 from any to 0.0.0.0/8
block out log body quick on pppoe0 from any to 169.254.0.0/16
block out log body quick on pppoe0 from any to 192.0.2.0/24
block out log body quick on pppoe0 from any to 204.152.64.0/23
block out log body quick on pppoe0 from any to 224.0.0.0/3

# Erlaube Ping, ident und ssh von aussen
#
# ping
pass in log quick on pppoe0 proto icmp from any to any icmp-type echo keep
state
# ssh
pass in log quick on pppoe0 proto tcp from any to any port = 26 flags S
keep state keep frags
#          22 flags S keep state keep frags
pass in log quick on pppoe0 proto tcp from any to any port 49160:49300
flags S keep state keep frags
 # auth/ident
#pass in log quick on pppoe0 proto tcp from any to any port =

#          113 flags S keep state keep frags

# Alle anderen geblockten Pakete werden geloggt (ipflog)
block in log quick from any to any
block out log quick from any to any
==================================

Das Problem ist jetzt wenn Ich mit einem Ftp Client Daten Raufladen will bzw
Daten von einem FTP-Server löschen will ,funktioniert das nur beschränkt
d.h. wenn "eine Datei" ca 50 MB und ich diese rauflade geht das ohne
probleme.
aber wenn ich einen Ordner raufladen möchte und Ich will es betonen ein
"ORDNER mit mehrere kleineren Daten z.B Gallery" keine Datei wenn ich
diese raufladen bzw löschen will bleib der FTP-Client hängen bzw es kommt
ein Timeout . Ich glaube es liegt an meine Konfig von ipnat und ipf .
Ich habe es getestet mit ein OpenBSD 3.8 als server da gab es keine
Probleme. Ich hoffe ihr habt mich verstanden.

Mfg