Skip to content

Commit

Permalink
Update to 7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
sonertari committed Apr 28, 2023
1 parent 524c070 commit b25ce3e
Show file tree
Hide file tree
Showing 189 changed files with 269 additions and 233 deletions.
5 changes: 3 additions & 2 deletions Doxyfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Doxyfile 1.9.5
# Doxyfile 1.9.6

#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "PF Rule Editor"
PROJECT_NUMBER = 7.2
PROJECT_NUMBER = 7.3
PROJECT_BRIEF =
PROJECT_LOGO =
OUTPUT_DIRECTORY = ./docs
Expand Down Expand Up @@ -114,6 +114,7 @@ WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_IF_INCOMPLETE_DOC = YES
WARN_NO_PARAMDOC = NO
WARN_IF_UNDOC_ENUM_VAL = NO
WARN_AS_ERROR = NO
WARN_FORMAT = "$file:$line: $text"
WARN_LINE_FORMAT = "at line $line of file $file"
Expand Down
48 changes: 24 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ You can find a couple of screenshots on the [wiki](https://github.com/sonertari/

Here are the basic steps to obtain a working PFRE installation:

- Install OpenBSD 7.2, perhaps on a VM.
- Install PHP 8.1.10, php-pcntl, and php-cgi.
- Install OpenBSD 7.3, perhaps on a VM.
- Install PHP 8.2.3, php-pcntl, and php-cgi.
- Copy the files in PFRE src folder to /var/www/htdocs/pfre/.
- Configure httpd.conf for PFRE.
- Create admin and user users, and set their passwords.
Expand All @@ -74,7 +74,7 @@ The OpenBSD installation guide is at [faq4](http://www.openbsd.org/faq/faq4.html

Here are a couple of guidelines:

- You can download install72.iso available at OpenBSD mirrors.
- You can download install73.iso available at OpenBSD mirrors.
- It may be easier to install a PFRE test system on a VM of your choice, e.g. VMware or VirtualBox, rather than bare hardware.
- 256MB RAM and 8GB HD should be enough.
- If you want to obtain a packet filtering firewall, make sure the VM has at least 2 ethernet interfaces:
Expand Down Expand Up @@ -103,16 +103,16 @@ Download the required packages from an OpenBSD mirror and copy them to $PKG\_PAT
capstone-4.0.2.tgz
femail-1.0p1.tgz
femail-chroot-1.0p3.tgz
gettext-runtime-0.21p1.tgz
gettext-runtime-0.21.1.tgz
libiconv-1.17.tgz
libsodium-1.0.18p1.tgz
libxml-2.10.2.tgz
libxml-2.10.3p1.tgz
oniguruma-6.9.8.tgz
pcre2-10.37.tgz
php-8.1.10p0.tgz
php-cgi-8.1.10.tgz
php-pcntl-8.1.10.tgz
xz-5.2.5p2.tgz
pcre2-10.37p1.tgz
php-8.2.3.tgz
php-cgi-8.2.3.tgz
php-pcntl-8.2.3.tgz
xz-5.4.1.tgz

Install PHP, php-pcntl, and php-cgi by running the following commands, which should install their dependencies as well:

Expand All @@ -131,16 +131,16 @@ Here is the expected output of that command:
capstone-4.0.2 multi-platform, multi-architecture disassembly framework
femail-1.0p1 simple SMTP client
femail-chroot-1.0p3 simple SMTP client for chrooted web servers
gettext-runtime-0.21p1 GNU gettext runtime libraries and programs
gettext-runtime-0.21.1 GNU gettext runtime libraries and programs
libiconv-1.17 character set conversion library
libsodium-1.0.18p1 library for network communications and cryptography
libxml-2.10.2 XML parsing library
libxml-2.10.3p1 XML parsing library
oniguruma-6.9.8 regular expressions library
pcre2-10.37 perl-compatible regular expression library, version 2
php-8.1.10p0 server-side HTML-embedded scripting language
php-cgi-8.1.10 php CGI binary
php-pcntl-8.1.10 PCNTL extensions for php
xz-5.2.5p2 LZMA compression and decompression tools
pcre2-10.37p1 perl-compatible regular expression library, version 2
php-8.2.3 server-side HTML-embedded scripting language
php-cgi-8.2.3 php CGI binary
php-pcntl-8.2.3 PCNTL extensions for php
xz-5.4.1 library and tools for XZ and LZMA compressed files

### Install PFRE

Expand Down Expand Up @@ -218,19 +218,19 @@ However, you are advised to pick a better password than soner123.
Go to /usr/local/bin/ and create a link to php executable:

# cd /usr/local/bin
# ln -s php-8.1 php
# ln -s php-8.2 php

Edit the /etc/php-8.1.ini file to write error messages to syslog, otherwise they may disturb pfctl test reports:
Edit the /etc/php-8.2.ini file to write error messages to syslog, otherwise they may disturb pfctl test reports:

error_log = syslog

Also, edit the /etc/php-fpm.conf file to write error messages to syslog:

error_log = syslog

To enable pcntl, go to /etc/php-8.1/ and create the pcntl.ini file:
To enable pcntl, go to /etc/php-8.2/ and create the pcntl.ini file:

# cd /etc/php-8.1/
# cd /etc/php-8.2/
# touch pcntl.ini

And add the following line to pcntl.ini:
Expand Down Expand Up @@ -269,9 +269,9 @@ If you want the web server to be started automatically after a reboot, first cop

Then add the following lines to it:

if [ -x /usr/local/sbin/php-fpm-8.1 ]; then
if [ -x /usr/local/sbin/php-fpm-8.2 ]; then
echo 'PHP CGI server'
/usr/local/sbin/php-fpm-8.1
/usr/local/sbin/php-fpm-8.2
fi

Create the rc.conf.local file under /etc/
Expand All @@ -296,7 +296,7 @@ And uncomment the line which enables forwarding of IPv4 packets:

Now you can either reboot the system or start the php cgi server and the web server manually using the following commands:

# /usr/local/sbin/php-fpm-8.1
# /usr/local/sbin/php-fpm-8.2
# /usr/sbin/httpd

Finally, if you point your web browser to the IP address of PFRE, you should see the login page. And you should be able to log in by entering admin:soner123 as user and password.
2 changes: 1 addition & 1 deletion src/Controller/ctlr.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env php
<?php
/*
* Copyright (C) 2004-2022 Soner Tari
* Copyright (C) 2004-2023 Soner Tari
*
* This file is part of UTMFW.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/lib.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2004-2022 Soner Tari
* Copyright (C) 2004-2023 Soner Tari
*
* This file is part of UTMFW.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/sh.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env php
<?php
/*
* Copyright (C) 2004-2022 Soner Tari
* Copyright (C) 2004-2023 Soner Tari
*
* This file is part of UTMFW.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Model/include.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2004-2022 Soner Tari
* Copyright (C) 2004-2023 Soner Tari
*
* This file is part of UTMFW.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Model/lib/AfTo.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2004-2022 Soner Tari
* Copyright (C) 2004-2023 Soner Tari
*
* This file is part of PFRE.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Model/lib/Anchor.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2004-2022 Soner Tari
* Copyright (C) 2004-2023 Soner Tari
*
* This file is part of PFRE.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Model/lib/Antispoof.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2004-2022 Soner Tari
* Copyright (C) 2004-2023 Soner Tari
*
* This file is part of PFRE.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Model/lib/BinatTo.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2004-2022 Soner Tari
* Copyright (C) 2004-2023 Soner Tari
*
* This file is part of PFRE.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Model/lib/Blank.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2004-2022 Soner Tari
* Copyright (C) 2004-2023 Soner Tari
*
* This file is part of PFRE.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Model/lib/Comment.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2004-2022 Soner Tari
* Copyright (C) 2004-2023 Soner Tari
*
* This file is part of PFRE.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Model/lib/DivertPacket.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2004-2022 Soner Tari
* Copyright (C) 2004-2023 Soner Tari
*
* This file is part of PFRE.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Model/lib/DivertTo.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2004-2022 Soner Tari
* Copyright (C) 2004-2023 Soner Tari
*
* This file is part of PFRE.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Model/lib/Filter.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2004-2022 Soner Tari
* Copyright (C) 2004-2023 Soner Tari
*
* This file is part of PFRE.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Model/lib/FilterBase.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2004-2022 Soner Tari
* Copyright (C) 2004-2023 Soner Tari
*
* This file is part of PFRE.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Model/lib/Include.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2004-2022 Soner Tari
* Copyright (C) 2004-2023 Soner Tari
*
* This file is part of PFRE.
*
Expand Down
16 changes: 15 additions & 1 deletion src/Model/lib/Limit.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2004-2022 Soner Tari
* Copyright (C) 2004-2023 Soner Tari
*
* This file is part of PFRE.
*
Expand Down Expand Up @@ -43,6 +43,14 @@ class Limit extends Rule
'method' => 'parseLimit',
'params' => array(),
),
'pktdelay_pkts' => array(
'method' => 'parseLimit',
'params' => array(),
),
'anchors' => array(
'method' => 'parseLimit',
'params' => array(),
),
);

protected $typeLimit= array(
Expand All @@ -63,6 +71,12 @@ class Limit extends Rule
'table-entries' => array(
'regex' => RE_NUM,
),
'pktdelay_pkts' => array(
'regex' => RE_NUM,
),
'anchors' => array(
'regex' => RE_NUM,
),
),
),
);
Expand Down
2 changes: 1 addition & 1 deletion src/Model/lib/LoadAnchor.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2004-2022 Soner Tari
* Copyright (C) 2004-2023 Soner Tari
*
* This file is part of PFRE.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Model/lib/Macro.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2004-2022 Soner Tari
* Copyright (C) 2004-2023 Soner Tari
*
* This file is part of PFRE.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Model/lib/NatBase.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2004-2022 Soner Tari
* Copyright (C) 2004-2023 Soner Tari
*
* This file is part of PFRE.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Model/lib/NatTo.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2004-2022 Soner Tari
* Copyright (C) 2004-2023 Soner Tari
*
* This file is part of PFRE.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Model/lib/Option.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2004-2022 Soner Tari
* Copyright (C) 2004-2023 Soner Tari
*
* This file is part of PFRE.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Model/lib/Queue.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2004-2022 Soner Tari
* Copyright (C) 2004-2023 Soner Tari
*
* This file is part of PFRE.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Model/lib/RdrTo.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2004-2022 Soner Tari
* Copyright (C) 2004-2023 Soner Tari
*
* This file is part of PFRE.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Model/lib/Route.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2004-2022 Soner Tari
* Copyright (C) 2004-2023 Soner Tari
*
* This file is part of PFRE.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Model/lib/Rule.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2004-2022 Soner Tari
* Copyright (C) 2004-2023 Soner Tari
*
* This file is part of PFRE.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Model/lib/RuleSet.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2004-2022 Soner Tari
* Copyright (C) 2004-2023 Soner Tari
*
* This file is part of PFRE.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Model/lib/Scrub.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2004-2022 Soner Tari
* Copyright (C) 2004-2023 Soner Tari
*
* This file is part of PFRE.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Model/lib/State.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2004-2022 Soner Tari
* Copyright (C) 2004-2023 Soner Tari
*
* This file is part of PFRE.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Model/lib/Table.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2004-2022 Soner Tari
* Copyright (C) 2004-2023 Soner Tari
*
* This file is part of PFRE.
*
Expand Down
Loading

0 comments on commit b25ce3e

Please sign in to comment.