Mal wieder PF-Fragen

K

kolvar

Mitglied
Moin moin,

ich stehe mal wieder wie der Ochs vorm Berge (oder wie der Kolvar vor PF). Wir haben einen openbsd router mit pf laufen, über den der Verkehr von mehreren Firmen ins Internet geleitet wird. Von aussen ist eigentlich nur Port 22 offen. Nun haben wir aber festgestellt, dass bei einem Portscan auf port 2324 offen steht (wohl im zusammenhang mit CosmoCaller, von dem wir nicht mal wußten, dass es drauf liegt und von dem ich auch nur den Mimetype auf dem Rechner finden kann).
Ich würde nun gerne diesen einen Port schließen, habe aber keine Ahnung wie. Habe schon die PF-Doku durchforstet, aber das einzige, was ich bisher finden konnte, war Portweiterleitung, was ich nicht will, ports für Updates und wie ich generell irgendwas schließe. Aber eigentlich hatte ich gedacht, ich hätte schon generell geschlossen. Und jetzt weiß ich entsprechend nicht, wie ich denn dem Port sage, dass er geschlossen sein soll (ach ja, in der rc.conf steht auch nicht wirklich was, was irgendwelche Ports angehen würde).

Ich könnte mal wieder eure großartige Hilfe brauchen.
Danke


Code:
ext_if="ep0"
int_if1="rl0"
int_if2="rl1"
int_if3="rl2"
int_if4="rl3"
int_net1="192.168.1.0/24"
int_net2="192.168.2.0/24"
int_net3="192.168.3.0/24"
int_net4="192.168.4.0/24"

scrub in all

nat on $ext_if from 192.168.1.0/24 to  ! $int_if1  -> ($ext_if)
nat on $ext_if from 192.168.2.0/24 to  ! $int_if2  -> ($ext_if)
nat on $ext_if from 192.168.3.0/24 to  ! $int_if3  -> ($ext_if)
nat on $ext_if from 192.168.4.0/24 to  ! $int_if4  -> ($ext_if)

nat-anchor  "authpf/*"


#rdr pass on $int_if1 proto tcp to port ftp -> 127.0.0.1 port 8021
#rdr pass on $int_if2 proto tcp to port ftp -> 127.0.0.1 port 8021
#rdr pass on $int_if3 proto tcp to port ftp -> 127.0.0.1 port 8021
#rdr pass on $int_if4 proto tcp to port ftp -> 127.0.0.1 port 8021

rdr pass on $int_if1 proto tcp from any to any port ftp -> 127.0.0.1 port 8021
rdr pass on $int_if2 proto tcp from any to any port ftp -> 127.0.0.1 port 8021
rdr pass on $int_if3 proto tcp from any to any port ftp -> 127.0.0.1 port 8021
rdr pass on $int_if4 proto tcp from any to any port ftp -> 127.0.0.1 port 8021

rdr on $ext_if proto tcp from any to any port 2323 -> 192.168.2.150 port 22
rdr on $ext_if proto tcp from any to any port 2324 -> 192.168.2.4 port 22
#block in log all

block in from $int_net1 to $int_net2
block in from $int_net1 to $int_net3
block in from $int_net1 to $int_net4

block in from $int_net2 to $int_net1
block in from $int_net2 to $int_net3
block in from $int_net2 to $int_net4

block in from $int_net3 to $int_net1
block in from $int_net3 to $int_net2
block in from $int_net3 to $int_net4

block in from $int_net4 to $int_net1
block in from $int_net4 to $int_net2
block in from $int_net4 to $int_net3


pass in on $int_if1 inet from $int_net1 to ( $ext_if ) modulate state
pass in on $int_if2 inet from $int_net2 to ( $ext_if ) modulate state
pass in on $int_if3 inet from $int_net3 to ( $ext_if ) modulate state
pass in on $int_if4 inet from $int_net4 to ( $ext_if ) modulate state



pass in on $ext_if inet proto tcp from port ftp-data to ($ext_if) user proxy flags S/SA k
eep state

pass in on $ext_if inet proto tcp from any to ($ext_if) port ssh keep state

pass in on $ext_if inet proto tcp from any to ($ext_if) user proxy keep state
 
Code:
rdr on $ext_if proto tcp from any to any port 2323 -> 192.168.2.150 port 22
rdr on $ext_if proto tcp from any to any port 2324 -> 192.168.2.4 port 22

Da isser doch offen ... kenn mich zwar mit pf nich wirklich aus, aber schaut doch so aus.
 
Du hast recht. Stundenlang auf die Datei gekuckt und das nicht gesehen (peinlich peinlich)

Danke
 

Ähnliche Themen

PF mit NAT OpenBSD 5.4

pf problem

Bruteforce-Angriffe auf FTP mit PF verhindern

Probleme mit pf config

pf: interne Anfragen-Umleitung

Zurück
Oben