15841 Commits

Author SHA1 Message Date
Franco Fichtner
a67dc2976f make: model style/lint for Mask/MaskPerItem 2023-09-30 19:44:43 +02:00
Franco Fichtner
3eeb1193ab wireguard: copyright header consolidation 2023-09-30 14:04:04 +02:00
Franco Fichtner
947543c7c6 interfaces: why is this called "alias" IP? 2023-09-30 13:40:00 +02:00
Csaba Kos
1f3311f5dd interfaces: allow multiple IP addresses in dhcp reject from; closes #6683 2023-09-30 13:34:28 +02:00
Franco Fichtner
b7c4631179 wireguard: add dependency for now #6827
Not pretty.  Need to hook wireguard-kmod on life support for
the initial 24.1 at least because we don't know at build time
if the kernel to be installed will have its own kernel module
or not.  Having both works, but the kernel one breaks wireguard-go.

Also implementations for kernel and port kmod seem to be "slightly"
different.
2023-09-29 09:46:17 +02:00
Franco Fichtner
af34db7077 wireguard: tweak 3 more labels #6827 2023-09-29 09:39:03 +02:00
Franco Fichtner
11f65055b3 wireguard: adjust the naming as per #6827
Before: server, client, local, endpoint, peer, interface, instance and
tunnel adapter were being used some times meaning the right thing but
often also displaced.

Now we try to stick to instance (a wireguard interface in its config),
device (pertaining to the actual network device in the system), peer
(a wireguard peer in its config) and endpoint (the actual "endpoint"
setting in a wireguard peer config).

But we can only rename the user facing GUI parts.  The API and config
structure will not change.

While here also update the model and tweak a few form labels and help
texts.
2023-09-29 09:26:39 +02:00
Franco Fichtner
871182c4f2 wireguard: merge net/wireguard as of version 2.2 #6827
Omit the dependency on wireguard-kmod as we will be targeting the kernel
module with 24.1.  Some people may run into this but it's safer than
trying to rely on a package that won't be available going from 23.7 to
24.1.
2023-09-29 08:32:12 +02:00
Ad Schellevis
a91bc81aaf DHCPv6 Leases - fix "ends never" parsing for https://github.com/opnsense/core/issues/6891 2023-09-28 22:30:29 +02:00
Franco Fichtner
40955ddaee dhcp: looks like a refactor gone wrong #6853 2023-09-28 17:42:24 +02:00
Franco Fichtner
77caf21778 openvpn: nitpicking on wording 2023-09-28 17:05:49 +02:00
Franco Fichtner
b66e24c755 interfaces: purge unused parts of the dhclient-script #6869
Once upon a time we tried to treat this script as an external one
since it's still maintained somewhat in FreeBSD but the approach
of integration is much different so the script ends up with half
of its code not doing anything and perhaps more than it should.
Upstream fixes are also not full applicable anymore.

* Clear the writing of the host name.  The system does that.  Simply
  keep the logging aspect of it (if given).
* Remove the $ARP flush on TIMEOUT/EXPIRE as it seems misplaced.
* Remove exit_with_hooks() and is_default_interface() as these are
  tools that are not needed in our integration approach.
* While trailing TIMEOUT/EXPIRE failure case make sure to run
  newwanip in optional mode in order to pick up missing configuration.
* Copyright the changes from 2021 onwards that offer substantial
  changes to the way the script integration works or cooperates with
  the rest of the system.
* Inline the one-time use of functions.
* Remove tip-toeing around $resolvconf_enable.
* Ignore dhclient-enter-hooks.
* Remove commented-out code.
2023-09-28 16:49:30 +02:00
Ad Schellevis
2e90f1cb5b VPN: OpenVPN: Instances - missing selectpicker on vhid selector 2023-09-28 15:45:18 +02:00
Franco Fichtner
ca2609efbd mvc: add "make validate" target and script 2023-09-27 16:29:35 +02:00
Franco Fichtner
10e726113b mvc: introduce isVolatile() for BaseModel
Needed for running batch validation as memory models have
do data so their validation fails.
2023-09-27 16:29:35 +02:00
Stephan de Wit
7a2f3f62d9 interfaces: drop PPP default route handling
the relevant route is configured later in the chain using getDefaultGW(),
no need to instruct mpd5 to set it for us.
2023-09-27 15:59:17 +02:00
Franco Fichtner
42cfb664f7 ipsec: model update 2023-09-27 14:36:48 +02:00
Franco Fichtner
7e3c63a3ab firewall: do not reference automatic rule that is hardcoded 2023-09-27 14:01:49 +02:00
Franco Fichtner
881610cfe8 system: reverse diff to show newer as green, less table markup for diff 2023-09-27 13:50:24 +02:00
Franco Fichtner
8ac86cc577 src: style sweep 2023-09-26 17:19:23 +02:00
Ad Schellevis
f75ec9688a System: Configuration: History - refactor using MVC components.
When \Deciso\OPNcentral\Central exists, there might be multiple providers to select from, so we can easily reuse the same component in both versions.

closes https://github.com/opnsense/core/issues/6828
2023-09-26 16:12:49 +02:00
Franco Fichtner
d9fcc0bbbf firewall: wrong link to VIP page 2023-09-26 08:41:16 +02:00
Ad Schellevis
dd40f71523 System: Configuration: History - move "backupcount" setting to "System: Configuration: Backups" for https://github.com/opnsense/core/issues/6828
Local backup configuration would be best stored in the backup configuration for consistency. Eventually we should refactor the backup configuration as well, but while refactoring the history page and adding a host selection (when used in conjunction with OPNcentral), this setting is a bit out of place.
2023-09-25 21:38:37 +02:00
Ad Schellevis
56e2940430 System: Access: Groups|Users - when adding the "user-config-readonly" privilege via "Select all", make sure to trigger the warning as well and note the name of the warning. In rare cases people select all and save finding out that nothing else is being stored anymore.
The future removal clause remains, although I don't expect it to go away any time soon as alternatives are hard to find.
2023-09-25 16:20:44 +02:00
Franco Fichtner
2bd3fb5d9f
interfaces: make link-local vips unique per interface #6775 (#6876) 2023-09-25 16:15:53 +02:00
Franco Fichtner
3a0b929386 system: fix stray char in help text 2023-09-25 16:09:16 +02:00
Franco Fichtner
bb6d69cc98 mvc: inline one time use of $parentKey 2023-09-25 14:58:58 +02:00
Franco Fichtner
f23f455bc4 firewall: improve previous by reusing a class constant #6880 2023-09-25 10:42:16 +02:00
Franco Fichtner
f8ff476cff firewall: quote a/n protocol; closes #6880 2023-09-25 10:13:19 +02:00
Franco Fichtner
f63fd66472 interfaces: for consistency bootstrap the implicit 'none' value 2023-09-25 09:09:25 +02:00
Franco Fichtner
0bd1280a45 interfaces: prevent reading config.xml garbage
The no prefix is only applicable when 'dhcp6' IPv6 mode is set.

PR: https://forum.opnsense.org/index.php?topic=35848.0
2023-09-24 20:54:31 +02:00
Franco Fichtner
633399de85 interfaces: improve logging in dhclient-script 2023-09-24 20:25:06 +02:00
Ad Schellevis
d971257fd9 Authentication / LDAP [+totp] - In cases where the user is able to influence their group membership according to the memberOf attribute, offer the ability to only match on those being selected ib the container section. Although cases like these are likely misconfigurations elsewhere, it may help to improve security in some cases (although likely one should still fix the issue in the identity provider as well).
mentioned in https://github.com/opnsense/core/issues/6871
2023-09-23 10:58:16 +02:00
Franco Fichtner
7fcbb22094 dhcp: merge_ipv6_address() was too intrusive
Testing 3582242d0fe10 it appeared that link-local addresses were
rewritten as GUAs in the dhcpd configuration.  The static map part
does this right, but all the other callers are not.  Flip this
around as it was intended.  The DHCPv6 page will now throw an out
of range error when it previously adjusted the explit prefix anyway.

dhcpd config with link local seems fine too, but more testing is
always good.
2023-09-22 14:22:56 +02:00
Alejandro Criado-Pérez
066d836afb
Multiple text corrections (#6867) 2023-09-22 13:46:11 +02:00
Franco Fichtner
11bbafed6e ipsec: improve new help texts 2023-09-22 13:38:30 +02:00
Daggolin
f53a60c911
openvpn: add up and down scripts to vpn instance configs (#6879) 2023-09-22 13:31:34 +02:00
Franco Fichtner
45c940fa26 mvc: style update 2023-09-22 13:27:59 +02:00
Franco Fichtner
a4b9e92769 mvc: IntegerField validation message update 2023-09-22 13:23:48 +02:00
Franco Fichtner
8d340ff5c8 mvc: NetworkField validation message update 2023-09-22 13:10:44 +02:00
Franco Fichtner
b3005955c1 mvc: HostnameField validation message 2023-09-22 13:08:13 +02:00
Franco Fichtner
7fab0249f7 mvc: EmailField validation msg 2023-09-22 13:05:54 +02:00
Franco Fichtner
90c5db7687 mvc: CSVListField validation message update
MaskPerItem=Y needs work and the preg_match() shoudldn't be used
to look inside the match which creates the initial problem:

/usr/local/opnsense/mvc/app/controllers/OPNsense/Base/ApiControllerBase.php:176:
Error at /usr/local/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/CSVListField.php:162 - Undefined array key 0 (errno=2)
2023-09-22 12:58:24 +02:00
Franco Fichtner
5d89666946 mvc: AutoNumberField validation message update 2023-09-22 12:37:58 +02:00
Franco Fichtner
cf80131910 mvc: BooleanField validation message and faulty regex fix 2023-09-22 12:32:09 +02:00
Franco Fichtner
3363fa9d2d mvc: Base64Field validation message update 2023-09-22 12:30:15 +02:00
Franco Fichtner
8aff5a9c81 mvc: NumericField validation message update 2023-09-22 12:17:41 +02:00
Franco Fichtner
2cd5fcac5c mvc: UnqiueIdField special validation message
If we ever derive from UnqiueIdField we would end up overwriting
this message and there is no data validation involved which the
message would be for so it can be null as per BaseField.
2023-09-22 11:29:32 +02:00
Franco Fichtner
8d8cc03ac3 mvc: UrlField validation message cleanup 2023-09-22 11:23:21 +02:00
Franco Fichtner
465f7fa8bb mvc: set Required=Y for GroupNameField
The validation message is never seen anymore and can't be overridden.
While the field made sure to emit a message on empty the result is
that if we ever have to use this group field as optional we would have
to pivot to this approach anyway.
2023-09-22 10:54:31 +02:00