PF: Problem beim Mailversand

Prymaxx

Member
Hallo zusammen.

Seit ein paar Wochen setze ich bei mir im Netz den OpenBSD 3.4 Packet Filter ein. Dank der ausführlichen Howto bin ich bisher auch gut zurecht gekommen.
Seit ein paar Tagen sitze ich jetzt allerdings vor einem Problem das mich verzweifeln lässt:

Mit meinem Notebook (NB1) kann ich problemlos Mails versenden. Von allen anderen Rechnern im Netz ist kein Mailversand möglich.

Wenn ich z.B. Outlook verwende fängt er an die Mail zu versenden, bricht dann aber nach ein paar Sekunden mit der Meldung "Die Verbindung zum Server wurde unerwartet getrennt" ab. Wenn ich einen Webmailer wie GMX benutze bekomme ich beim Versenden einen Timeout.

Trotz intensiver Suche habe ich bisher nichts über ein ähnliches Problem gefunden, daher gehe ich mal davon aus, dass ich irgend einen Bug in meiner pf.conf habe. Aber entweder bin ich blöd oder blind, ich finde ihn nicht.
Wäre nett wenn Ihr mal einen Blick drauf werfen könntet, vielleicht ist es ja was ganz triviales und ich übersehe es einfach.
Vielen Dank.

Gruss Benni

Code:
[Internet]-----[Router 192.168.10.100]----- rl2 [192.168.10.254 OpenBSD 192.168.5.254] rl1 -----[Server2 192.168.5.200]
                                                                   |
                                                             [10.10.0.254]
                                                                  rl0
                                                                   |
                                                                   |
      [WLAN AP 10.10.0.100]-------------+--------------------------+--------------------------+
            |        |                  |                          |                          |
            |        |                  |                          |                          |
            |        |                  |                          |                          |
            |        |                  |                          |                          |
 [NB1 10.10.0.4]  [NB2 10.10.0.5]       |                          |                          |
                                        |                          |                          |
                                        |                          |                          |
                                        |                          |                          |
                                        |                          |                          |
                              [Server1 10.10.0.200]        [Tux 10.10.0.3]            [Gismo 10.10.0.2]

#pf.conf
#Macros
int_if = "rl0"
vm_if = "rl1"
ext_if = "rl2"
loopback = "lo0"

#Inbound ports
tcp_services = "{ 25, 110, 21, 80, 4662, 2000, 10000, 2047, 6699, 24499><24506, 24509><24516 }"
udp_services = "{ 4672, 6257 }"

#Outbound ports (queueing)
#voip_port = "{ }"
emule_ports = "{ 4662 }"

icmp_types = "echoreq"

set block-policy return
set loginterface $ext_if

scrub in on $ext_if all

# Queueing
altq on $ext_if priq bandwidth 230Kb queue { tcp_ack_out, voip_out, dns_out, std_out, emule_out }
queue tcp_ack_out priority 7
queue voip_out priority 6
queue dns_out priority 5
queue std_out priority 3 priq(default)
queue emule_out priority 1 priq(ecn)


nat on $ext_if from $int_if:network to any -> $ext_if
nat on $ext_if from $vm_if:network to any -> $ext_if


#Redirect (FTP-Proxy)
rdr on $int_if proto tcp from any to any port 21 -> 127.0.0.1 port 8021

#Redirect (Incoming)
#Webmin
rdr on $int_if proto tcp from any to any port 10000 -> 127.0.0.1 port 10000
rdr on $int_if proto tcp from any to any port 10001 -> 192.168.5.200 port 10000
rdr on $ext_if proto tcp from any to any port 10000 -> 127.0.0.1 port 10000
#Apache
rdr on $ext_if proto tcp from any to any port 80 -> 10.10.0.200 port 80
#FTP
rdr on $ext_if proto tcp from any to any port 21 -> 10.10.0.200 port 21
#NB1 eMule
rdr on $ext_if proto tcp from any to any port 4662 -> 10.10.0.4 port 4662
rdr on $ext_if proto udp from any to any port 4672 -> 10.10.0.4 port 4672
#NB1 RemotelyAnywhere
rdr on $ext_if proto tcp from any to any port 2000 -> 10.10.0.4 port 2000
#GISMO Webcam
rdr on $ext_if proto tcp from any to any port 2047 -> 10.10.0.2 port 2047
#GISMO WinMX
rdr on $ext_if proto tcp from any to any port 6699 -> 10.10.0.2 port 6699
rdr on $ext_if proto udp from any to any port 6257 -> 10.10.0.2 port 6257
#GISMO ICQ File Transer
rdr on $ext_if proto tcp from any to any port 24500 -> 10.10.0.2 port 24500
rdr on $ext_if proto tcp from any to any port 24501 -> 10.10.0.2 port 24501
rdr on $ext_if proto tcp from any to any port 24502 -> 10.10.0.2 port 24502
rdr on $ext_if proto tcp from any to any port 24503 -> 10.10.0.2 port 24503
rdr on $ext_if proto tcp from any to any port 24504 -> 10.10.0.2 port 24504
rdr on $ext_if proto tcp from any to any port 24505 -> 10.10.0.2 port 24505
#NB1 ICQ File Transfer
rdr on $ext_if proto tcp from any to any port 24510 -> 10.10.0.4 port 24510
rdr on $ext_if proto tcp from any to any port 24511 -> 10.10.0.4 port 24511
rdr on $ext_if proto tcp from any to any port 24512 -> 10.10.0.4 port 24512
rdr on $ext_if proto tcp from any to any port 24513 -> 10.10.0.4 port 24513
rdr on $ext_if proto tcp from any to any port 24514 -> 10.10.0.4 port 24514
rdr on $ext_if proto tcp from any to any port 24515 -> 10.10.0.4 port 24515


#Debug
#pass quick all

#Filter Rules
block all
block quick inet6

pass quick on $loopback all

pass in inet proto icmp all icmp-type $icmp_types keep state
pass out inet proto icmp all icmp-type $icmp_types keep state

#Filter rl0 inbound
pass in on $int_if from $int_if:network to any keep state

#Filter rl0 outbound
pass out on $int_if from any to $int_if:network keep state

#Filter rl1 inbound
pass in on $vm_if from $vm_if:network to any keep state

#Filter rl1 outbound
pass out on $vm_if from any to $vm_if:network keep state

#Filter rl2 inbound
pass in on $ext_if inet proto tcp from any to any \
port $tcp_services flags S/SA keep state
pass in on $ext_if inet proto udp from any to any \
port $udp_services keep state

#Filter rl2 outbound
pass out on $ext_if inet proto tcp from $ext_if to any modulate state flags S/SA \
queue ( std_out, tcp_ack_out )
pass out on $ext_if inet proto { udp, icmp } from $ext_if to any keep state
pass out on $ext_if inet proto { tcp, udp } from $ext_if to any port domain keep state \
queue dns_out
#pass out on $ext_if inet proto udp from $ext_if to any port $voip_port keep state \
queue ( voip_out, tcp_ack_out )
pass out on $ext_if inet proto { tcp, udp } from $ext_if to any port $emule_ports keep state \
queue ( emule_out, tcp_ack_out )
 
Setze mal in deinen Outbound-Regeln die Option "quick" ein.

Dadurch werde diese als "last match" gewertet und sofort ausgeführt.
 
Kann ich für die rl2 leider nicht machen, da ich mir ansonsten das Queueing schenken könnte. Aber auch ein "pass quick all" brachte keine Veränderung.
Aber ich konnte das Problem weiter eingrenzen.
Alle Geräte die über den Wireless Accesspoint angebunden sind funktionieren tadellos. Sobald ich das Notebook über Kabel anbinde ist es nicht mehr möglich Mails zu versenden.
Da der Accesspoint aber für das Netzwerk völlig transparent ist, und nur als Bridge fungiert, denke ich dass der Fehler auf Protokollebene zu suchen ist.
Ich werde das Scrubbing mal mit auf die internen Interfaces ausdehnen. Wenn das nichts bringt bleibt mir wohl nichts anderes übrig als mit nem Sniffer bei zu gehen.
 
So... Problem gelöst.
Es lag tatsächlich an einer ungünstigen Hardwarekombination. Ich hab meinen alten Router und den Accesspoint ausgetauscht und nun läuft´s wieder :D
 
Zurück
Oben