1

I am running OpenBSD 4.4, I copied the template from https://markshroyer.com/guides/router/ch07.html for /etc/pf.conf and edited it to match my network. When I start it I get syntax errors on only three lines that I didn't need to edit:
match on $if_wan scrub (reassemble tcp random-id max-mss 1440),

match out on $if_wan from $net_private to !(if_wan) nat-to ($if_wan) which I tried editing to match out on $if_wan from $net_private to !($if_wan) nat-to ($if_wan), and

pass in on $if_lan net photo tcp to port ftp rdr-to 127.0.0.1 port 8021 These are the only lines that claim a syntax error. Anyone know what the problem is and how to fix it?

  • 1
    OBSD 4.4 is really old and (I believe) the syntax has changed substantially. I think in this case you're going to have a hard time finding help. Can you upgrade to 5.8? – unclejamil Nov 10 '15 at 14:48
  • 1
    FreeBSD uses the same version of PF as OpenBSD 4.5 so someone who is versed in FreeBSD's pf version might be able to help. – Thomas Weinbrenner Nov 10 '15 at 17:55
  • I should have added that it was for a lab setting, and not for actual deployment. I was only using 4.4 because I found a VM of it. I have since switched to 5.8 and it parses without any errors. – user52470 Nov 12 '15 at 19:43
0

The syntax I was using was for a newer version of PF, and in order to fix it I just upgraded to the latest version of OpenBSD.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.