Fout in PF.CONF?

Pagina: 1
Acties:
  • 47 views sinds 30-01-2008

  • Zware Unit
  • Registratie: Maart 2001
  • Laatst online: 09-01 22:32
Ben een beginnen op het gebied van de PF in OpenBSD, maar heb een gegin gemaakt met mijn eigen PF instellingen. Gaat om een OpenBSD 3.4 server met
- sshd
- ftp
- www

dus ik heb de volgende config in elkaar gesleuteld.

##
scrub in all

## Incomming Filter TCP - UDP - ICMP (BEGIN)
block in all

# TCP
block in proto TCP all
pass in log on proto TCP port = 20 keep state
pass in log on proto TCP port = 21 keep state
pass in log on proto TCP port = 22 keep state
pass in log on proto TCP port = 80 keep state

# UDP
block in proto udp all

# ICMP
block in proto icmp all

## Incomming Filter TCP - UDP - ICMP (END)

werkt dus niet :(

als ik deze config als test draai dan geeft hij aan dat alle tcp-pass regels niet kloppen (syntax error). Ik heb diverse how-to`s gelezen, maar kom er niet uit.

... all gonna wonder how you ever thought you could live so large and leave so little for the rest of us...


  • Predator
  • Registratie: Januari 2001
  • Laatst online: 09:39

Predator

Suffers from split brain

PNS -> NOS

Everybody lies | BFD rocks ! | PC-specs


Verwijderd

Je moet nog een interface specificeren, of het keyword `on' weglaten:

Hierbij kan ik je het gebruik van variabelen aanraden, dus:

nic = "de0"

pass in log on $nic proto TCP port = 20 keep state
pass in log on $nic proto TCP port = 21 keep state
pass in log on $nic proto TCP port = 22 keep state
pass in log on $nic proto TCP port = 80 keep state

of

pass in log proto TCP port = 20 keep state
pass in log proto TCP port = 21 keep state
pass in log proto TCP port = 22 keep state
pass in log proto TCP port = 80 keep state

Verder kun je dit korter schrijven:

pass in log on $nic proto TCP port = {20,21,22,80} keep state

of

pass in log proto TCP port = {20,21,22,80} keep state

  • JJJ
  • Registratie: Mei 2000
  • Laatst online: 09:42

JJJ

Is die = in "port = 20" verplicht? Ik heb dat niet..

  • blaataaps
  • Registratie: Juli 2001
  • Niet online
[ "on" interface-name ] [ af ]
uit de manpage van pf, als je al weet welke regels het foutgaat, lijkt dat troubleshooten met helemaal niet zo moeilijk (overigens is pf.conf gewoon met kleine letters hoor). Kwestie van goed lezen, met de tips hier moet je er wel uit kunnen komen denk ik, succes!

[ Voor 10% gewijzigd door blaataaps op 20-01-2004 19:39 ]


Dit topic is gesloten.