Re: Re: ipnat geht ploetzlich nach Tagen nicht

From: <christian(at)gruendemann.com>
Date: Thu, 31 Jul 2003 12:08:01 +0200

Hendrik Scholz <hscholz(at)raisdorf.net> schrieb am 31.07.2003, 11:14:02:
> Moin Moin!
>
> On Thu, 31 Jul 2003 09:48:02 +0200
> wrote:
>
> > IPNAT Konfiguration:
> > map rl1 192.168.23.0/24 -> 0/32
> > (Oh oh, die Realtak Karte ist es aber nicht, oder?)
>
> Hinter rl1 vom Server ist ein Hardware-Router?
> Wenn Du DSL hast (20ms ping zum DNS suggeriert das :)) muesstest Du
> (wenn Du selbst am DSL haengst) hier tun0 angeben.
Ist SDSL mit Hardware Router von QSC. Der Router ist so eingestellt,
dass er nur routet, und nix anderes macht.

>
> > 09:35:28.510585 192.168.23.2.1275 > cns01.qsc.de.domain: 1+ PTR?
> > 10.129.148.213.in-addr.arpa. (45)
> > 09:35:29.331391 FBSD-SERVER.51361 > cns01.qsc.de.domain: 22882+ PTR?
> > 10.129.148.213.in-addr.arpa. (45)
>
> Siehst Du die beiden Pakete in dem gleichen Netzsegment?
> Das obere (von nem Linux 2.4?) ist eine direkte Anfrage, die du ein
> zweites
> Mal nur auf dem externen Interface des FreeBSD Rechners sehen solltest,
> dann
> allerdings mit der gleichen 'query id'.

tcpdump auf dem internen interface bringt mir folgendes:
root(at)mail ~ tcpdump -i rl0 port 53
tcpdump: listening on rl0
11:48:02.723661 192.168.23.2.ies-lm > cns01.qsc.de.domain: 1+ PTR?
10.129.148.213.in-addr.arpa. (45)
11:48:04.716632 192.168.23.2.marcam-lm > cns02.qsc.de.domain: 2+ PTR?
10.130.148.213.in-addr.arpa. (45)
11:48:06.720309 192.168.23.2.proxima-lm > cns01.qsc.de.domain: 3+ A?
www.freebsd.org. (33)
11:48:08.719195 192.168.23.2.ora-lm > cns01.qsc.de.domain: 4+ A?
www.freebsd.org. (33)

tcpdump auf dem externen bringt folgendes zu Tage:

11:55:04.019356 192.168.23.2.dca > cns01.qsc.de.domain: 1+ PTR?
10.129.148.213.in-addr.arpa. (45)
11:55:04.390075 FBSDSERVER.de.51429 > cns01.qsc.de.domain: 33324+ PTR?
10.129.148.213.in-addr.arpa. (45)
11:55:04.410071 cns01.qsc.de.domain > FBSDSERVER.51429: 33324 1/2/2
(141) (DF)
11:55:04.410677 FBSDSERVER.51430 > cns01.qsc.de.domain: 33325+ PTR?
2.23.168.192.in-addr.arpa. (43)
11:55:04.431576 cns01.qsc.de.domain > FBSDSERVER.51430: 33325 NXDomain
0/1/0 (120) (DF)

Angefragt wird von einem W2K Client SP4 mittels:
nslookup www.freebsd.org

>
> > 09:35:29.352540 cns01.qsc.de.domain > FBSD-SERVER.51361: 22882 1/2/2
> > (141) (DF)
>
> Das ist eine gueltige Antwort mit einem Hostnamen als Antwort.
>
> > 09:35:29.353143 FBSD-SERVER.51362 > cns01.qsc.de.domain: 22883+ PTR?
> > 2.23.168.192.in-addr.arpa. (43)
> > 09:35:29.372551 cns01.qsc.de.domain > FBSD-SERVER.51362: 22883
> > NXDomain 0/1/0 (120) (DF)
>
> hier fragt der Server selbst und bekommt natuerlich keine gueltige
> Antwort,
> da es sich um eine RFC1918-Adresse handelt.
>
> > Vor einer Woche hatte ich das Problem schon einmal. Nach einem Reboot
> > lief das NAT wieder problemlos. Dies kann nicht die Loesung sein, hat
> > also irgendwie jemand eine Idee?
>
> Eintraege in der ipf state table, die Pakete blocken?
klar, aber auch wenn ich alles auf allow setze geht nicht. Bis gestern
waren ja meine rules auch ok.

> Hast Du Logging an?
ja.
hier ein auszug fuer die Nameserver Abfrage:
31/07/2003 11:55:04.390050 rl1 @0:14 p 212.202.xxx.xxx,51429 ->
213.148.129.10,53 PR udp len 20 73 K-S OUT
31/07/2003 11:55:04.410101 rl1 @0:14 p 213.148.129.10,53 ->
212.202.xxx.xxx,51429 PR udp len 20 169 K-S IN
31/07/2003 11:55:04.410655 rl1 @0:14 p 212.202.xxx.xxx,51430 ->
213.148.129.10,53 PR udp len 20 71 K-S OUT
31/07/2003 11:55:04.431605 rl1 @0:14 p 213.148.129.10,53 ->
212.202.xxx.xxx,51430 PR udp len 20 148 K-S IN
31/07/2003 11:55:06.429565 rl1 @0:14 p 212.202.xxx.xxx,51431 ->
213.148.129.10,53 PR udp len 20 73 K-S OUT
31/07/2003 11:55:06.450148 rl1 @0:14 p 213.148.129.10,53 ->
212.202.xxx.xxx,51431 PR udp len 20 169 K-S IN
>
> Laeuft auf dem FreeBSD ein Nameserver?
Nein. Ich benutze die Nameserver von QSC.

> Die erste Anfrage hat fuer mich nicht wirklich etwas mit den
> anderen zu tun, da a) die Query-ID anders ist und b) der FreeBSD-Server
> dort nicht auftaucht.
> Die Zeitdifferenz zwischen dem ersten und zweiten Paket ist auch zu
> gross,
> als dass es weitergeleitet oder von einem caching nameserver sein
> koennte.
>
> Poste mal einen 'Netzplan' und die relevanten Auszuege aus der ipf/ipnat
> Config.

Netzplan ist ganz simpel:
<SDSL Router> <-> <FreeBSD Server 5.1> <-> <W2K Client>

Auszug aus IPF Config:
#intern alles erlauben
pass in quick on rl0 all keep state
pass out quick on rl0 all keep state

#AntiSpoofing
block out log quick on rl1 from any to 192.168.23.0/24
block out log quick on rl1 from any to 192.168.23.0/16
block out log quick on rl1 from any to 192.168.23.0/32
[...]

#ALLOW SPECIFIC OUTGOING TRAFFIC
pass out log quick on rl1 proto udp from any to any port = 53 keep
state
pass out log quick on rl1 proto tcp from any to any port = 110 flags S
keep state
pass out quick on rl1 proto tcp from any to any port = 25 flags S keep
state
pass out log quick on rl1 proto udp from any to any port = 123 keep
state
pass out quick on rl1 proto tcp from any to any port = 80 flags S keep
state
pass out quick on rl1 proto tcp from any to any port = 22 flags S keep
state

#ALLOW SPECIFIC INCOMING TRAFFIC
pass in log quick on rl1 proto tcp from any to any port = 80 flags S
keep state

# allow statefull packets
pass out all keep state
pass in all keep state

# DENY EVERTHING ELSE
block out log on rl1 all
block in log on rl1 all

Viele Gruesse,
Christian

>
> Mfg, Hendrik
>
> --
> Hendrik Scholz - - http://raisdorf.net/
>
> drag me, drop me - treat me like an object
>
> To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org
> with "unsubscribe de-bsd-questions" in the body of the message

To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Thu 31 Jul 2003 - 12:10:06 CEST

search this site