PDA

View Full Version : [Solved] Pf - syntax error


Magnesik
February 20th, 2010, 23:30
Im a new user of freebsd 8.0-RELEASE-i386. I've try to use PF firewall but it unfortunately doesn't work.

I've added to /etc/rc.conf these 2 lines:

pf_enable="YES"
pflog_enable=YES"

and pf.conf to /etc/ because it didn't exist.

In pf.conf I wrote:

block in all
pass out all

After /etc/rc.d/pf start I get:

http://img682.imageshack.us/img682/7335/snapshot2m.th.png (http://img682.imageshack.us/i/snapshot2m.png/)

freebsd# pfctl -e
No ALTQ support in kernel
ALTQ related funcions disabled
pfctl: pf already enabled

What is wrong?

DutchDaemon
February 21st, 2010, 00:45
pflog_enable=YES"
must be
pflog_enable="YES"

Magnesik
February 21st, 2010, 01:11
Of corse in rc.conf is pflog_enable="YES". I made mistake while I was copying out it. Besides during booting I have message like "pflog promiscuous mode enabled"

jemate18
February 21st, 2010, 03:03
can you try

pfctl -e -f /etc/pf.conf

Magnesik
February 21st, 2010, 15:43
I get the same error as after /etc/rc.d/pf start


No ALTQ support in kernel
ALTQ related functions disabled
/etc/pf.conf:2: syntax error
pfctl: Syntax error in config file: pf rules not loaded

When I put in /etc/rc.conf only "block in all" then it works.
It looks like pf doesn't know what is "pass". When I put there only "pass out all" I get again the same error but with information that first line is wrong.

Magnesik
February 21st, 2010, 17:23
Problem is solved. I've edited PF configuration files with mcedit and I didn't end last line by enter. And I get error syntax in line where I didn't do it.