f0x
Punk
Hi,
ich hab vergangene Woche meinen Homeserver neu aufgesetzt und mal OpenBSD 4.6 draufgepackt.
Nachdem ich heute eine pf.conf erstellt hatte, viel mir auf, dass nach Aktivierung dieser, alle Netzwerk-Dienste extrem langsam laufen oder garnicht mehr funktionieren.
Das wirkt sich zum Beispiel bei SSH aus, indem nach eingabe des Login-Namens es 1 bis 2 Minuten dauert bis der Passwort Promt erscheint (nach korrekter Eingabe des Passworts funktioniert innerhalb des SSH Terminals alles flüssig).
FTP zum beispiel baut eine Verbindung auf und reagiert dann garnicht mehr. Die Verbindung ist allerdings noch aktiv...
Woran kann das liegen??? Ich find den Fehler nicht, oder stell mich zu blöde an...
Hier die pf.conf
Lg
f0x
ich hab vergangene Woche meinen Homeserver neu aufgesetzt und mal OpenBSD 4.6 draufgepackt.
Nachdem ich heute eine pf.conf erstellt hatte, viel mir auf, dass nach Aktivierung dieser, alle Netzwerk-Dienste extrem langsam laufen oder garnicht mehr funktionieren.
Das wirkt sich zum Beispiel bei SSH aus, indem nach eingabe des Login-Namens es 1 bis 2 Minuten dauert bis der Passwort Promt erscheint (nach korrekter Eingabe des Passworts funktioniert innerhalb des SSH Terminals alles flüssig).
FTP zum beispiel baut eine Verbindung auf und reagiert dann garnicht mehr. Die Verbindung ist allerdings noch aktiv...
Woran kann das liegen??? Ich find den Fehler nicht, oder stell mich zu blöde an...
Hier die pf.conf
Code:
# Firewall Configuration by f0X 03/04/2010
# Makros
int_if="rl0"
ext_if="rl1"
# tables
table <ssh-bruteforce> persist file "/etc/1.ssh-bruteforce.block.conf"
table <registered> { 192.168.20.1, 192.168.20.2, 192.168.20.51, 192.168.20.9, 192.168.20.11, 192.168.20.12, 192.168.20.13, 192.168.20.14, 192.168.20.101, 192.168.20.98 }
table <banned> persist file "/etc/1.banned.block.conf"
# Options
set block-policy drop
set loginterface $ext_if
set skip on lo0
# NAT
# filters
block in all
antispoof quick for { $ext_if $int_if }
######## blocks ########
# block banned ip's
block drop in log (all) quick on $ext_if from <banned> to any
# block bad ssh requests (anti brute-force)
block drop in log quick from <ssh-bruteforce> to any
# block ping
block drop in log quick on $ext_if inet proto icmp from any to any
######## passes ########
# allow icmp from internal network
pass in on $int_if inet proto icmp all icmp-type echoreq keep state
# ssh port
pass in log quick proto tcp from any to any port 46255 \
flags S/SA keep state \
(max-src-conn-rate 3/30, overload <ssh-bruteforce> flush global)
######## int ########
# ftp
pass in quick on $int_if inet proto tcp \
to any port 21 \
flags S/SA keep state
# http_int
pass in quick on $int_if inet proto tcp \
to any port 80 \
flags S/SA keep state
# http_main
pass in quick on $int_if inet proto tcp \
to any port 81 \
flags S/SA keep state
# samba
pass in quick on $int_if inet proto tcp \
to any port 139 \
flags S/SA keep state
# http_second
pass in quick on $int_if inet proto tcp \
to any port 46123 \
flags S/SA keep state
######## ext ########
# ftp
pass in log on $ext_if inet proto tcp \
from <registered> to ($ext_if) port 21 \
flags S/SA modulate state
# samba
pass in log on $ext_if inet proto tcp \
from <registered> to ($ext_if) port 139 \
flags S/SA modulate state
# http_main
pass in log on $ext_if inet proto tcp \
to any port 80 \
keep state
# http_second
pass in log on $ext_if inet proto tcp \
to any port 46123 \
keep state
f0x
