11705 Commits

Author SHA1 Message Date
Franco Fichtner
b5493874b3 firmware: revoke 19.7 fingerprint and fix boot logo 2020-03-16 15:05:29 +01:00
Franco Fichtner
f7a1226b39 pkg: fix plist 2020-03-16 14:16:16 +01:00
Ad Schellevis
6276812309 MVC: logging, fixed with for timestamp column 2020-03-16 13:49:34 +01:00
Ad Schellevis
6b62ed4fe2 IDS: fix obsolete warning in suricata : [ERRCODE: SC_WARN_OPTION_OBSOLETE(233)] - netmap interface em1+ uses obsolete '+' notation. Using '^' instead. 2020-03-16 13:36:22 +01:00
Franco Fichtner
0481c26fe1 pkg: allow using different updater 2020-03-16 07:15:39 +01:00
Franco Fichtner
665c90fd66 config: install fingerprint for 20.7 2020-03-16 07:13:47 +01:00
Ad Schellevis
02e6e00c12 MVC: limit dropdown size to 10 is none specified, larger lists seem to overlap sometimes (data-size attribute in selectpicker) 2020-03-14 05:15:24 +01:00
Ad Schellevis
893f2a4af9 Firewall: prevent gateway protocol mismatch from breaking the ruleset. 2020-03-13 17:55:13 +01:00
Ad Schellevis
cda4e3561f syslog: if /var/run/legacy_log is being created while syslog-ng is booting, it sometimes leads to crashes/dumps of the latter. make sure the socket exists before asking syslog-ng to start 2020-03-13 15:24:00 +01:00
Ad Schellevis
5d99be7c0c fix plist 2020-03-13 15:23:42 +01:00
Franco Fichtner
f09aceecb3 system: set net.pf.request_maxcount default value
While here also migrate the enc filter rules to our new style.
Useful for testing so tunables can be overwritten by users.

PR: https://github.com/opnsense/core/issues/3969
2020-03-13 14:28:53 +01:00
Ad Schellevis
116511910d sshd: add HostKeyAlgorithms for https://github.com/opnsense/core/issues/3975 2020-03-13 09:54:59 +01:00
Ad Schellevis
e738e3ca05
ifgroups: simplify group maintenance for https://github.com/opnsense/core/issues/3780 (#3977)
It doesn't really seem to make sense to try to link groups on different places, if they're only usable for pf which is always reloaded when new interfaces are connected.
The new ifgroup_setup() synchonizes attached interfaces for all configured groups, only rename and delete are still being served from the management pages (to avoid dropping static groups like openvpn).
2020-03-13 08:24:37 +01:00
Ad Schellevis
858116e0fc Merge branch 'cdeconinck-master' 2020-03-12 15:08:38 +01:00
Ad Schellevis
d7983fd99f whitespace / consistency for https://github.com/opnsense/core/pull/3976 2020-03-12 15:07:53 +01:00
cedric.deconinck@nerim.com
82cdd740ee Allow concurrent add and delete request with alias_util API
Currently the API has a strange behavior when we try to add or delete in parallel several addresses in the same alias
For example, while we want to delete multiple address  (1 request = 1 address) all the request returns a 200 OK {"status": "done »}, but some address stay in the alias content
The same logic apply for the alias_utils/add endpoint

This behavior can be reproduced with this python script
import os
import subprocess

addr_list = ["10.1.0.0", "10.1.0.1", "10.1.0.2", "10.1.0.3", "10.1.0.4",
             "10.1.0.5", "10.1.0.6", "10.1.0.7", "10.1.0.8", "10.1.0.9", "10.1.0.10"]

secret = ""
key = ""
host = ""
existing_alias = ""

for addr in addr_list:
    subprocess.Popen(
        ["curl   --header \"Content-Type: application/json\"   --basic   --user \"" + secret + ":" + key + "\"   --request POST  --data  '{\"address\":\"" + addr + "\"}' http://" + host + "/api/firewall/alias_util/add/" + existing_alias], shell=True, stdin=None, stdout=None, stderr=None, close_fds=True)

With this fix, adding and removing addresses works correctly in parallel
2020-03-12 14:25:45 +01:00
Ad Schellevis
5df590cd13 SSH: optional KexAlgorithms, Ciphers and MACs to harden security. closes https://github.com/opnsense/core/issues/3975 2020-03-12 13:47:56 +01:00
Ad Schellevis
005f7744f4 usermanager: add (i) button to display endpoints, eases debugging 2020-03-11 15:20:04 +01:00
Ad Schellevis
0e2751d2d1 rc.linkup: filter_configure() needs to be called after stop/start devd action to assure default gateway switching actual has the change to do something
04d4f50cca/src/etc/inc/filter.inc (L291-L307)

for https://github.com/opnsense/core/issues/3961
2020-03-10 15:08:43 +01:00
Ad Schellevis
535c85101a MVC, config: fix previous 2020-03-10 10:50:33 +01:00
Ad Schellevis
fc60d04cd6 MVC, config: fix getBackupFilename(), floats aren't really safe to use of we only want to split the number part. 2020-03-10 10:47:14 +01:00
vnxme
faf71c7e70
Fix nsComment inconsistency in OpenSSL config (#3955)
Read more about the Netscape extensions status: 

https://www.openssl.org/docs/man1.0.2/man5/x509v3_config.html
2020-03-10 09:48:53 +01:00
Ad Schellevis
8f3c89642c MVC, config: add method to find backup filename (or false if not found)
needed for  https://github.com/opnsense/plugins/issues/1720
2020-03-09 18:41:26 +01:00
Ad Schellevis
5b7268bb17 MVC, config: expose backupCount() which returns the number of backups to keep.
might be needed for https://github.com/opnsense/plugins/issues/1720
2020-03-09 16:06:30 +01:00
Ad Schellevis
01fb3a4f44 MVC / config: synchronize backup timestamps with revisions.
A minor change, previously we requested microtime() twice which always lead to a small difference in revision and backup. If we sync these two timestamps, it's easier to find the previous sitation updated.time matches /conf/backup/config-[updated.time].xml
2020-03-09 15:16:22 +01:00
Ad Schellevis
211fd8dfb3 firewall: for automatic rules, floatind means either all interfaces (empty) or more than one selected. for https://github.com/opnsense/plugins/issues/1720 2020-03-09 15:13:02 +01:00
Franco Fichtner
2c25b1cffa pkg: accept build-time flavour selection 2020-03-06 12:37:27 +01:00
Ad Schellevis
9562ff80f0 firewall: rule lookup redirector, don't escape internal urls provided by $rule->getRef(), to make suer we can properly support slashes etc in urls. The risk of this change should be rather low, since you need local access to feed '#ref' (which is the origin of getRef())
need to be able to redirect to /ui/firewall/filter/ for https://github.com/opnsense/plugins/issues/1720
2020-03-05 17:10:20 +01:00
Ad Schellevis
9f07049498 filter: flush priority sections to rules.debug, eases traceability
ref: https://github.com/opnsense/plugins/issues/1720

    # Please enter the commit message for your changes. Lines starting
2020-03-05 14:47:24 +01:00
Franco Fichtner
a3cf8cf81b mvc: PSR12 is really picky :) 2020-03-05 07:57:47 +01:00
Ad Schellevis
550bcea155 MVC: In order to extend the separate nodes of an arraytype field, we should be able to control the container creation. This commit adds newContainerField() which is responsible for spawning new container fields and attaching them to the current model.
Internally the object model looks like this:

ArrayField - [
	ContainerField - [
		TextField
		EmailField
		....
	]
	ContainerField - [
		{same types as first row}
	]
]

uuid's are attached to the ContainerField types by the ArrayField (or on load by BaseModel)

ref: https://github.com/opnsense/plugins/issues/1720
2020-03-04 15:09:37 +01:00
Ad Schellevis
a8b2fb5e92 MVC: support inheritance of the ArrayField type, institutionalise the type by adding a method isArrayType() to the basefield, which returns true if the type itself is a ArrayField or one of its descendants.
Conceptually there are two types containers in our model, the standard one (ContainerField), which only acts as a placeholder without logic and the ArrayField type, which understands repetitive structures and comes with its own uuid reference per item and methods supporting addition and removal of entries.

With the application specific field types it can be practical if you could extend this container type as well, so you can add additional methods on a more logical spot in the code tree.

ref https://github.com/opnsense/plugins/issues/1720
2020-03-04 13:48:18 +01:00
Ad Schellevis
41cf191205 pam/squid: work around to skip passing additional auth properties. https://forum.opnsense.org/index.php?topic=16126 2020-03-04 11:44:47 +01:00
Ad Schellevis
665e3db1f6 packet capture, validate interface input. closes https://github.com/opnsense/core/issues/3964 2020-03-04 11:30:36 +01:00
Franco Fichtner
a4a26fa898 src: style sweep 2020-03-03 14:25:20 +01:00
Ad Schellevis
8496073046 MVC: BaseField, also store "" as initial state to prevent empty fields as being marked as changed all the time.
Side affect of this change is that testDependConstraintNok seemed to be missing a back reference, which is being added in this commit as well (TestModel.xml).

Catched while working on https://github.com/opnsense/plugins/issues/1720
2020-03-03 14:12:08 +01:00
Franco Fichtner
67bbb8e342 dhcp: parenthesis are bad style, either important without or discard 2020-03-03 12:39:05 +01:00
Franco Fichtner
582adc9ef2 dnsmasq/unbound: return strings to their original form
This is too much valid translation bounce noise and will not help.
This is better explained in detail in a documentation page if
users really read it, that is.
2020-03-03 12:32:40 +01:00
Ad Schellevis
6d2d6a7ad7 firewall: carp, miss a bit of visibility on internal rules, refer to setting page for allow rule and make sure redirector understands links without page reference 2020-03-02 21:31:37 +01:00
Ad Schellevis
9aac0415ef fix plist 2020-03-02 20:13:04 +01:00
Ad Schellevis
5ed7f4a54e MVC: add NetworkAliasField type for https://github.com/opnsense/plugins/issues/1720
Validate if input is either a valid network, host or alias including specialnetworks (any, self, or attached interface net/address)
2020-03-02 20:55:46 +01:00
Ad Schellevis
6da8a2f558 MVC: BaseListField + PortField, use getValidationMessage() to bootstrap defaults. found while working on https://github.com/opnsense/plugins/issues/1720, needed for the new NetworkAliasField type 2020-03-02 18:37:34 +01:00
Ad Schellevis
7bd1dab314 MVC: fix typo in unit test naming. (https://github.com/opnsense/plugins/issues/1720) 2020-03-02 17:52:13 +01:00
Franco Fichtner
c6314e20d1 pkg: fix plist 2020-03-02 14:19:49 +01:00
Ad Schellevis
1bdb252f96 MVC: ProtocolField missing gettext (https://github.com/opnsense/plugins/issues/1720) 2020-03-02 13:55:51 +01:00
Ad Schellevis
6d5301a7b3 MVC: CountryField, static options should take settings into account. 2020-03-02 12:09:16 +01:00
Ad Schellevis
e057fce06d MVC: add unittest for ProtocolField (https://github.com/opnsense/plugins/issues/1720) 2020-03-02 10:42:39 +01:00
Ad Schellevis
dddbe2f1ec MVC: protocol field, init bug (https://github.com/opnsense/plugins/issues/1720) 2020-03-02 10:36:16 +01:00
Franco Fichtner
43f320342a pkg: fix plist 2020-03-02 09:38:09 +01:00
Ad Schellevis
c104582ed7 logging: leap-year issue. without a year, strptime() doesn't seem to assume it's this year. 2020-02-29 17:23:10 +01:00