15963 Commits

Author SHA1 Message Date
Stephan de Wit
f2ce004a92 OpenVPN: Instances: IPv6 isn't as picky as IPv4 2023-10-30 14:45:12 +01:00
Stephan de Wit
2304bdbd3e OpenVPN: Instances: host bits must not be set for --server directive
The instance will not start if host bits are set
2023-10-30 12:05:32 +01:00
Franco Fichtner
b2b2c4133b firmware: clear more pkg garbage
While here serialize the background script into one as that
may be less straining on the system since we need to clean up
more now.
2023-10-30 11:37:38 +01:00
Franco Fichtner
1785cd3935 pkg: also add squid language pack, no longer in main package 2023-10-30 09:53:28 +01:00
Ad Schellevis
5c69267d46 model dialog padding (2), it seems the left spacing (advanced mode) doesn't match the right one (full help), lets change both to 10px to fix symmetry and make the buttons icons less sticky on the left. (https://github.com/opnsense/core/issues/6957) 2023-10-30 08:59:35 +01:00
Franco Fichtner
63354e8726 firewall: actually fix placement by moving into alias migration
When migrating Category this fails with an error:

 Fatal error: Uncaught Error: Call to undefined method OPNsense\Firewall\Category::flushCache() in /usr/local/opnsense/mvc/app/library/OPNsense/Firewall/Util.php:176
 Stack trace:
 #0 /usr/local/opnsense/mvc/app/models/OPNsense/Firewall/Migrations/M1_0_0.php(103): OPNsense\Firewall\Util::attachAliasObject(Object(OPNsense\Firewall\Category))
 #1 /usr/local/opnsense/mvc/app/models/OPNsense/Base/BaseModel.php(711): OPNsense\Firewall\Migrations\M1_0_0->run(Object(OPNsense\Firewall\Category))
 #2 /usr/core/src/opnsense/mvc/script/run_migrations.php(54): OPNsense\Base\BaseModel->runMigrations()
 #3 {main}
   thrown in /usr/local/opnsense/mvc/app/library/OPNsense/Firewall/Util.php on line 176
2023-10-29 16:37:42 +01:00
Franco Fichtner
28df2b8fb6 firewall: when migrating aliases make sure that nesting does not fail 2023-10-29 11:56:57 +01:00
Franco Fichtner
e74cce9305 system: update gateways model 2023-10-29 07:44:06 +01:00
Stephan de Wit
d560e84934 dpinger: bring in remainder from gateways model conversion 2023-10-27 10:09:44 +02:00
Franco Fichtner
ea6272e3a8 ui: style sweep 2023-10-26 16:03:11 +02:00
Ad Schellevis
cde83b0a0c VPN: IPsec: Connections - re-add hashing options to GCM ciphers, but at the bottom of the list. In theory these are only valid for IKE (https://users.strongswan.narkive.com/0YfEZ2CS/question-about-ike-aes256gcm16-aesxcbc-modp2048-in-ipsec-conf), but as there seems to be some confusion and having them doesn't really hurt, we are going to re-add them anyway for ESP and IKE.
We might want to reassess this at some point, but there's not rush.

ref: https://forum.opnsense.org/index.php?topic=36638.0
2023-10-26 15:09:32 +02:00
Ad Schellevis
8439eeb90c Reporting/Health - new rrd fetchData.py can't cope with rrd files containing a single measurement very well. https://forum.opnsense.org/index.php?topic=36634.0 2023-10-26 14:41:41 +02:00
Monviech
837de4771e wg - fix error when empty tunnel address in instance (#3638) 2023-10-26 13:50:27 +02:00
Franco Fichtner
96b47255be firmware: fix slowness in applying firmware settings
We don't even need the full rc.configure_firmware script as that
is for after a core package was updated.  Rather we just want the
actual firmware settings to reload so we add a different path for
it.  Now it is faster than it ever was.
2023-10-26 08:56:56 +02:00
Ad Schellevis
d0a40796a7 Wireguard - startup missing import (bug) 2023-10-25 14:53:28 +02:00
Ad Schellevis
1452683b65 MVC / templates - prevent form submit for MVC pages, closes https://github.com/opnsense/core/issues/6958 2023-10-25 12:12:44 +02:00
Franco Fichtner
56fdab4e0d system: make a note about rcons integration 2023-10-25 08:50:19 +02:00
Ad Schellevis
5715d82a7f MVC / model - loosen constraints a bit when cloning Array field types.
When children are not of ArrayField type we're only cloning an empty structure which should be relativly safe and can be practical to offer grouping inside the model.
Add iterateRecursiveItems() as easy to use "dig" function to crawl through the model from any given point.
2023-10-24 21:01:00 +02:00
Ad Schellevis
d085f4ef36 themes/opnsense - remove default modal padding, add padding inside bootstrap-dialog-message instead (the BootstrapDialog needs padding). closes https://github.com/opnsense/core/issues/6957 2023-10-24 19:42:05 +02:00
Ad Schellevis
2f1996cc05 MVC/ Form dialogs - make dialogs draggable. closes https://github.com/opnsense/core/issues/6947
It's a bit of an experiment, but being able to drag the modal is practical sometimes. This commit attaches mouse events to drag on the header of the model so we can move the modal offset, when reopening the same it resets back to its starting position.
2023-10-24 18:21:46 +02:00
Franco Fichtner
c225e122eb interfaces: more consistent naming in wireguard 2023-10-24 14:34:43 +02:00
Franco Fichtner
676e9581dd interfaces: match validation and mask in LAGG 2023-10-24 14:24:52 +02:00
Franco Fichtner
dccf9143c2 interfaces: improve neighbor form 2023-10-24 14:24:32 +02:00
Franco Fichtner
16d0a071ad interfaces: fix the intricate cleanup of link-local VIPs
The VIPs are bound to the scope so we need to add it to the
address lookup.  From the controller emit the same "@" usage
which is used to indicatge a scope, but not no a network
device.  If encountered translate the scope back to a network
device and use the proper "%" syntax.
2023-10-24 10:37:38 +02:00
Ad Schellevis
ad2e5e7515 Interfaces: Virtual IPs: Settings - fix config locking when deleting a node.
This is a bit of a tricky one, delBase() always locks, which enforces the proper sequence in concurrent operations, but when reading the config first with getModel(), we are locking the wrong state (memory doesn't equal disk anymore).
2023-10-24 10:11:47 +02:00
Ad Schellevis
b0f3e131f5 mvc/OptionField type - fix regression in bc195308be , can't make choices static, unless we would serialize $data's payload first. to avoid further issues, just go back to always setting the values. 2023-10-23 16:59:13 +02:00
Franco Fichtner
8228f5de5f system: need to detect a password shift from off <=> on
This doesn't check a shifting password for other technical
reasons but is more correct and fixes toggling disabled
authentication on my end.

PR: https://forum.opnsense.org/index.php?topic=36528.0
2023-10-23 11:25:45 +02:00
Ad Schellevis
a99f2600a5 backend: template helpers. Add physical_interface and physical_interfaces as helper functions to remove the need for a separate macro to map interface names. Eventually we might consider removing the macro as well, but since the plugins use it heavily, we can't do that right now.
The new physical_interfaces() helper simplifies the constructions where we just need a list of configured device names, skipping the ones that don't exist.
Refactor existing core templates to remove the use of the interface.macro file.
2023-10-22 17:46:34 +02:00
Ad Schellevis
71e8201e5a Firewall/Aliases - fix regression in BaseContentParser, throwing an error due to not being hooked to an alias anymore. Since we don't know its origins, the plain address is likely the best next best thing to log here. 2023-10-21 10:03:54 +02:00
Ad Schellevis
d09fdd53c1 VPN: WireGuard: Settings - fix some small cosmetic issues in the volt template 2023-10-20 18:28:52 +02:00
Ad Schellevis
4bef809bd0 VPN: WireGuard - fix wireguard group registration, as our reconfigureAction() is custom, we can not use invokeInterfaceRegistration() here. 2023-10-20 17:54:58 +02:00
Stephan de Wit
c2d07aeef6 wireguard: move route reconfigure to wg_start
we shouldn't attempt to reconfigure the system routes if wireguard
isn't enabled.
2023-10-20 16:23:27 +02:00
Franco Fichtner
845ba727c8 firmware: fix forward compat with pkg 1.20 being backwards incompatible
Ok, so now we work with 1.20 but cannot use it because we can't render
the repo file before pkg updates itself and causes it to malfunction.
That means we cannot add 1.20 before 24.1.1.

Even if we fixed our mirror to be SRV compatible two facts remain:

1. We cannot control third party mirrors which will likely all be
   plain HTTP(S).

2. pkg 1.20.x from FreeBSD will still break firewall operation and
   upgrades if left on the system so we make the situation better now
   to bite the user later on.
2023-10-20 11:59:06 +02:00
Ad Schellevis
41b8feec94 Interfaces/neighbor - although camel case works in endpoints, better to underscore the actions as phalcon's routing expects camelcase to underscore (https://docs.phalcon.io/3.4/en/routing#defining-routes) 2023-10-19 21:35:03 +02:00
Franco Fichtner
edeff46f3f system: ok it's an Error then 2023-10-19 13:14:20 +02:00
Franco Fichtner
9e9be4351f system: add trad. Chinese
It's already over 30% but needs to be vetted first.  Language
pack that includes this is 23.7.7.
2023-10-19 11:49:10 +02:00
Stephan de Wit
24b5fdc42e interfaces: do not flush states on clear
flushed states are propagated to pfsync, which means a machine
in backup state is still vulnerable to any event that hooks
into the interface_bring_down logic on the primary machine.
2023-10-19 11:34:23 +02:00
Stephan de Wit
eecc882825 openvpn: do not flush state table on linkdown
This has the effect of killing valid states possibly unrelated to
openvpn that are propagated via pfsync
2023-10-19 09:59:47 +02:00
Franco Fichtner
5b2f7f4423 interfaces: missing copyright header here too 2023-10-19 09:11:16 +02:00
Franco Fichtner
07ef4ac3ea ipsec: spacing and missing copyright header 2023-10-19 09:07:35 +02:00
Franco Fichtner
19f089a73a ipsec: change the spacing, add copyright year due to recent changes 2023-10-19 09:02:40 +02:00
Franco Fichtner
047b25cc2d system: adjust the dialog presentation a bit
The danger representation is a bit over the top for deleting
a backup.  The revert is a bit too lax.  So move both to a
warning and indicate that the yes button is the one that should
be clicked in these cases, but in the same warning color as the
modal itself.  While here change the title to something more
appropriate.
2023-10-19 08:58:11 +02:00
Franco Fichtner
24a7fbe4f0 ui: fix the styling of the base form button when overriding the label
As seen on the packet capture page.
2023-10-19 08:49:59 +02:00
Franco Fichtner
ba34c05086 mvc: style sweep 2023-10-19 08:43:11 +02:00
Ad Schellevis
3a70baedec MVC/PortField - minor regression in setEnableAlias() always turning our content into lower case items. since known portnames are lowercase, let's check if case matters and only lowercase in these cases. 2023-10-18 20:44:02 +02:00
Ad Schellevis
0d724ec850 MVC / form handling (opnsense.js) - regression in optgroup handling introduced in 9206823d60
Two issues found, when optgroup is not used and filled with an empty item, the length of the group seems to be 0. To retrieve the selected values, we should use val() as iterating the children of the select won't return the options anymore.
2023-10-18 20:27:57 +02:00
Ad Schellevis
3b2a0c9a75 System: Configuration: History - missing dropdown cleanup after file removal. closes https://github.com/opnsense/core/issues/6944 2023-10-18 18:17:40 +02:00
Franco Fichtner
7c052881fa interfaces: numbering is hard 2023-10-18 15:06:29 +02:00
Franco Fichtner
16ce982fa6 system: keep polling if watcher cannot load a class
This happened two times now...

[09-Oct-2023 19:25:44 Europe/Berlin] PHP Fatal error:  Uncaught Error: Class "OPNsense\Base\ModelException" not found in /usr/local/opnsense/mvc/app/models/OPNsense/Base/BaseModel.php:314
Stack trace:
  thrown in /usr/local/opnsense/mvc/app/models/OPNsense/Base/BaseModel.php on line 314
2023-10-18 14:23:21 +02:00
Franco Fichtner
3778fee6d1 system: restructure previous a little 2023-10-18 14:18:28 +02:00