12165 Commits

Author SHA1 Message Date
Ad Schellevis
668d916834 MVC - core: add VirtualIPField including unit tests for https://github.com/opnsense/plugins/issues/2091 2020-11-06 14:23:06 +01:00
Franco Fichtner
8282910e5b pkg: fix plist 2020-11-06 08:11:40 +01:00
Ad Schellevis
766bd666ae IDPS: work in progress policy editor for https://github.com/opnsense/core/issues/4445 2020-11-05 18:15:01 +01:00
Ad Schellevis
6c6a94e95f Revert "gateways: far gateway IPv6 for https://github.com/opnsense/core/issues/4436"
This reverts commit d87f4d79c42deb84b51a0cac59f06cb55b93a199.
2020-10-30 17:37:35 +01:00
Ad Schellevis
d87f4d79c4 gateways: far gateway IPv6 for https://github.com/opnsense/core/issues/4436
(I'm not sure this works, let's ask for a test first)
2020-10-30 17:32:13 +01:00
Franco Fichtner
4e9a8abf98 firmware: add async reconfigure hook to syslog
rc.configure_plugins is likely fixed, but rc.configure_firmware
has the same issue so make this more maintanable by moving the
async request to the system function and put the former call back
with the async flag set.

Should fix syslog-ng related package configure hangs with regard
to pkg-based bug in recent versions.
2020-10-29 09:08:28 +01:00
Ad Schellevis
0ad3ec432f openvpn: (ipv4 only) when only ifconfig_local is provided, calculate first network address as gateway address. for https://github.com/opnsense/core/pull/4433 2020-10-28 20:09:01 +01:00
Ad Schellevis
84e3c4b33a Merge branch 'nowstuseeit-master' into master 2020-10-24 01:22:21 +02:00
Ad Schellevis
4198a1a8f3 proxy: cleanup, simlpify and add model version for https://github.com/opnsense/core/pull/4383 2020-10-24 01:21:51 +02:00
Ad Schellevis
f6865ddffb Syslog: make sure to start/stop the correct syslog facility, detach reconfiguration in rc.configure_plugins for https://github.com/opnsense/core/issues/4397 2020-10-24 01:14:47 +02:00
Franco Fichtner
5ebce0d8ac system: second try ;) 2020-10-24 01:14:47 +02:00
Franco Fichtner
b92bbb37b5 pkg: plist fix 2020-10-24 01:14:47 +02:00
Ad Schellevis
3ee8e907fe add Base64Field type, closes https://github.com/opnsense/core/issues/4398 2020-10-24 01:14:47 +02:00
Franco Fichtner
74843e75b6 Revert "system: syslog_ng_pid replaced by syslog_ng_pidfile in FreeBSD ports"
This reverts commit 466b0de94dd2c61aebec6d53cd4adca26b7bba30.
2020-10-24 01:14:47 +02:00
ServiusHack
097a894c4e Auth/LDAP: Fix reading displayName attribute (#4418)
In 6f76b5f the displayName attribute was added as the first camel case
attribute being read from the search result. As various[^1] comments[^2]
for `ldap_search` mention the attribute names must be lower case, even
though the LDAP server might return them differently.

Using all lower case to access the returned attribute results in the
value of displayName actually being used as the full name of the user.

[^1]: https://www.php.net/manual/en/function.ldap-search.php#37317
[^2]: https://www.php.net/manual/en/function.ldap-search.php#28991
2020-10-24 01:14:47 +02:00
Ad Schellevis
4235c72900 Filter: associated nat rules miss state keyword and when they would, the tag wouldn't be processed properly ($rule['type'] --> pass)
The associated nat rules remain a terrible construct, ideally we would make sure the automated rule matches a regular one, but if they do, the firewall_rules_edit.php page has to handle all sorts of corner cases leading to other unexpected behaviour.

This fixes a bug, cleaning this up would either need proper validations in the filter page or no extra validations at all (create/update, only note the relation, but don't try to enforce anything when associated-rule-id is set.
2020-10-24 01:14:47 +02:00
Franco Fichtner
9ad7e5463f unbound: sort targets 2020-10-24 01:14:47 +02:00
Ad Schellevis
327850e1b0 firewall_nat_edit.php fix "PHP Warning: in_array() expects parameter 2 to be array, null given in /usr/local/www/firewall_nat_edit.php on line 542" when interface is missing, closes https://github.com/opnsense/core/pull/4407 2020-10-24 01:14:47 +02:00
Ad Schellevis
e7c01545bf event "auth user changed", optimize core_user_changed_groups() to only perform local_group_set() when there are changes needed. found while working on https://github.com/opnsense/core/issues/4411 2020-10-24 01:14:47 +02:00
Ad Schellevis
ad747cdff0 system - usermanager: signal "auth user changed" when a user is modified via the webui. This should be rather harmless (the event was added in ecfd53ac2f)
Eventually some of the functionality in user/group management maybe moved to this hook, but to ensure a fast path to production, we'll keep duplicate work for now.

for https://github.com/opnsense/core/issues/4411
2020-10-24 01:14:47 +02:00
Frank Wall
d3d352c21d ipsec: add description to reconfigure action (#4401)
refs https://github.com/opnsense/plugins/issues/2019
2020-10-24 01:14:47 +02:00
Ad Schellevis
ade287d61e interfaces / assignments: lexical sort interface keys, closes https://github.com/opnsense/core/issues/4394 2020-10-24 01:14:47 +02:00
Franco Fichtner
f04ce0de80 src: style sweep 2020-10-24 01:14:47 +02:00
Franco Fichtner
b39e1ad3fd pkg: fix plist 2020-10-24 01:14:47 +02:00
Ad Schellevis
8830913bfe backup / history: keep backup count default in a single spot, as discussed with @fichtner 2020-10-24 01:14:47 +02:00
Ad Schellevis
6eb7a2da64 core / mvc: add new config changed event using syshook structure
o in order for this to work properly we need to change when a config backup is made, previously we performed a backup before the fact, now we backup afterwards. which means the top level always represents the current change (and can thus be signaled to an event handler). After upgrade one might lose a single backup file due to this change, but that should be a small price to pay for progress.
o config backup count was defined incorrect (60 instead of 100 according to the gui)
o the syslog-ng event structure is using the existing configd handler and filters relevant events within a small time frame (which prevents flooding configd)

Since the event is loosely coupled, the risk for releasing this into an existing environment should be rather low.

For https://github.com/opnsense/core/issues/4388

sponsored by : Modirum (https://www.modirum.com/)
2020-10-24 01:14:47 +02:00
Franco Fichtner
d7670dc4dd system: syslog_ng_pid replaced by syslog_ng_pidfile in FreeBSD ports
Since the setting is the default we simply migrate by removing the
explicit use.
2020-10-24 01:14:47 +02:00
Franco Fichtner
76dacdc62c dhcp: RA MTU only written once 2020-10-24 01:14:47 +02:00
Franco Fichtner
a7b7523b66 src: sync 2020-10-24 01:14:47 +02:00
Ad Schellevis
161f948cdd Unbound: rebuild unbound blacklist download, fix previous (.conf files are being imported by unbound so we need to use another suffix for our config files) 2020-10-24 01:14:47 +02:00
Ad Schellevis
b9c1e0f630 Unbound: rebuild unbound blacklist download
o move all templates into one standard ini file containing all required info for the blacklists
o add syslog output (in unbound log view) about processing and error handling
o validate "whitelist" regexp entries before usage
o lock process while performing download task
o don't try to download in parallel, the gain is relatively small and adds complexity.
o remove last unboundplus action, migrate cron jobs if they exist
2020-10-24 01:14:47 +02:00
Ad Schellevis
8902dd560b interfaces: change max mtu value to 65535 in accordance with rfc791 (https://tools.ietf.org/html/rfc791). closes https://github.com/opnsense/core/issues/4359 2020-10-24 01:14:47 +02:00
Ad Schellevis
2269f1d302 Unbound / blacklists: remove unmaintained lists and add the other lists from https://github.com/blocklistproject/Lists while here. 2020-10-24 01:14:47 +02:00
Ad Schellevis
5b193c083a Unbound / Blacklist : move "URLs of Blacklists" to advanced 2020-10-24 01:14:47 +02:00
Ad Schellevis
186a8815b8 Syslog: make sure to start/stop the correct syslog facility, detach reconfiguration in rc.configure_plugins for https://github.com/opnsense/core/issues/4397 2020-10-23 10:00:38 +02:00
Franco Fichtner
dbdd820f6f system: second try ;) 2020-10-22 22:22:43 +02:00
Franco Fichtner
630803d3d0 pkg: plist fix 2020-10-22 22:02:07 +02:00
Ad Schellevis
43bd9812b6 add Base64Field type, closes https://github.com/opnsense/core/issues/4398 2020-10-22 20:30:28 +02:00
Franco Fichtner
7a6cee7db5 Revert "system: syslog_ng_pid replaced by syslog_ng_pidfile in FreeBSD ports"
This reverts commit 466b0de94dd2c61aebec6d53cd4adca26b7bba30.
2020-10-22 10:58:15 +02:00
ServiusHack
eae9392580
Auth/LDAP: Fix reading displayName attribute (#4418)
In 6f76b5f the displayName attribute was added as the first camel case
attribute being read from the search result. As various[^1] comments[^2]
for `ldap_search` mention the attribute names must be lower case, even
though the LDAP server might return them differently.

Using all lower case to access the returned attribute results in the
value of displayName actually being used as the full name of the user.

[^1]: https://www.php.net/manual/en/function.ldap-search.php#37317
[^2]: https://www.php.net/manual/en/function.ldap-search.php#28991
2020-10-17 18:39:48 +02:00
Ad Schellevis
a225fdf5d1 Filter: associated nat rules miss state keyword and when they would, the tag wouldn't be processed properly ($rule['type'] --> pass)
The associated nat rules remain a terrible construct, ideally we would make sure the automated rule matches a regular one, but if they do, the firewall_rules_edit.php page has to handle all sorts of corner cases leading to other unexpected behaviour.

This fixes a bug, cleaning this up would either need proper validations in the filter page or no extra validations at all (create/update, only note the relation, but don't try to enforce anything when associated-rule-id is set.
2020-10-14 20:36:35 +02:00
Franco Fichtner
c8cc436cc8 unbound: sort targets 2020-10-14 14:01:29 +02:00
Ad Schellevis
3dc47c23a3 firewall_nat_edit.php fix "PHP Warning: in_array() expects parameter 2 to be array, null given in /usr/local/www/firewall_nat_edit.php on line 542" when interface is missing, closes https://github.com/opnsense/core/pull/4407 2020-10-13 22:18:56 +02:00
Ad Schellevis
51489f83de event "auth user changed", optimize core_user_changed_groups() to only perform local_group_set() when there are changes needed. found while working on https://github.com/opnsense/core/issues/4411 2020-10-13 17:54:42 +02:00
Ad Schellevis
9731dc8fa7 system - usermanager: signal "auth user changed" when a user is modified via the webui. This should be rather harmless (the event was added in ecfd53ac2f)
Eventually some of the functionality in user/group management maybe moved to this hook, but to ensure a fast path to production, we'll keep duplicate work for now.

for https://github.com/opnsense/core/issues/4411
2020-10-13 12:58:30 +02:00
Frank Wall
9695905b1a
ipsec: add description to reconfigure action (#4401)
refs https://github.com/opnsense/plugins/issues/2019
2020-10-07 09:47:46 +02:00
Ad Schellevis
5b7716611d interfaces / assignments: lexical sort interface keys, closes https://github.com/opnsense/core/issues/4394 2020-10-05 09:33:43 +02:00
Franco Fichtner
c4c7e8ab53 src: style sweep 2020-10-04 10:12:18 +02:00
Franco Fichtner
37f2ef7073 pkg: fix plist 2020-10-04 07:15:45 +02:00
Ad Schellevis
de291e6266 backup / history: keep backup count default in a single spot, as discussed with @fichtner 2020-10-02 18:46:08 +02:00